hi there,
Quote:
Originally posted by eddiebaby1023
I'd use a script that read in each line. Ignore the first and save the AAA line in a variable, then echo each line with the variable appended. Too simple to warrant the complications of sed, really. If the requirement gets more complicated then sed would definitely be the way to go, though; awk can be a bit clunky (IMO).
|
ok. agreed.
the task is too simple to use sed...
i will give some tips about sed anyway....
personally, i prefer to write more statements than trying complex regexp...
something in these lines... let's say that your file is called dummy...
Code:
...
anything=`sed -n "/AAA/p" dummy`
anything2=`sed -n "/VERSION/d;/AAA/d" dummy`
...
you just need to append $anything to each line of the output from $anything2...
attention if you need this thing readable in *nix and Windows env.. you have to handel EOF ...
regards
slackie1000