Sunday, June 28, 2009

Writing SED Script

Testing and Saving Output

Follow this 3 steps

- Makes a copy of the input line.

- Modifies that copy in the pattern space.

- Outputs the copy to standard output

Script and Command

$ sed -f sedscr paulfile

$ sed -f sedscr paulfile > newpaulfile

$ diff paulfile newpaulfile

for x
do
sed -f sedscr $x > tmp.$x
done

No comments:

Post a Comment