[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

Re: Is there a way to change condition tag's name?



> Tom Neuburger asks:
> > Has anyone tried editing the MIF file to change all occurrences
> > of the Cond name from "string1" to "string2"? 
> 
> I haven't tried it either. You would still need "string3" as a temporary 
> tag so you could keep the string1s separate from the string2s. 
>   string1 --> string3
>   string2 --> string1
>   string3 --> string2

No, you don't need an extra temporary name. If you have a MIF file,
you can use a text-processing command that changes string1 into string2,
and the other way around, without any risk of confusion.

As an example, on UNIX:
  sed 's/InCondition `string1/InCondition `string2/\
  t\
  s/InCondition `string2/InCondition `string1/' filename.mif > newfile.mif


This may look like greek to you, but it works :-)
(For those of you familiar with sed, it's the 't' command that ignores
the second replacement if the first has already been made.)


- - - - - - - - - - - - - - - - - - - - - -
Thomas Michanek, FrameMaker/UNIX/MIF expert
mailto:Thomas.Michanek@telia.com   (Sweden)
  http://go.to/framers , or go directly to:
  http://w1.133.telia.com/~u13304072/framers
- - - - - - - - - - - - - - - - - - - - - -


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **