You're replying to a comment by Tony.

Tony Permalink
January 16, 2010, 16:25

Hi,

I'm very interested by the tips 52 et 53
I would like to know if it is possible, to subsitute something in the previous line or following line the line containing the patter. I don't know if it is possible

cat file

foo bar
the rate of gold very high
dollar usa currency
Our currency your problem
gold

I would like to transform it with one line sed script to

foo bar
PREVIOUS LINE PATTERN DOLLAR
dollar usa currency
FOLLOWING LINE PATTERN
gold

Thanks

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.