Re: Search and Replace with Different Text



Deepan MYSQL wrote:

length=5
awk 'awk 'NR==FNR {repl[FNR]=$0;next} /<B>/{$0="<B>"repl[++count]"</
B>"}' ' myDataFile CDUSARBFIN2G99277.xml > new.xml

length=5
awk 'NR==FNR {repl[FNR]=$0;next}
/<B>/{$0="<B>"repl[++count]"</B>"}
' myDataFile CDUSARBFIN2G99277.xml > new.xml

Be careful with single quotes.

.



Relevant Pages

  • Re: Search and Replace with Different Text
    ... Deepan MYSQL wrote: ... B>"}' ' myDataFile CDUSARBFIN2G99277.xml> new.xml ... Be careful with single quotes. ...
    (comp.unix.shell)
  • Re: Search and Replace with Different Text
    ... Deepan MYSQL wrote: ... B>"}' ' myDataFile CDUSARBFIN2G99277.xml> new.xml ... Be careful with single quotes. ...
    (comp.unix.shell)
  • Re: Search and Replace with Different Text
    ... On Monday 8 June 2009 15:30, Deepan MYSQL wrote: ... to replace only the first five digits.. ... Yes that had a mistake, ... ' myDataFile CDUSARBFIN2G99277.xml> new.xml ...
    (comp.unix.shell)
  • Re: Search and Replace with Different Text
    ... On Monday 8 June 2009 14:15, Deepan MYSQL wrote: ... ' myDataFile CDUSARBFIN2G99277.xml> new.xml ... So summing up all the bits of information that you have slowly released so ... still missing. ...
    (comp.unix.shell)