You're viewing a comment by Dwayne and its responses.

November 21, 2011, 14:50

Go up to your last command on AIX 5.3 and ran into problems. It tried to run it as written and kept getting a parse error. Adding a semicolon after the second x got rid of the parse error, and it seems to be matching something, but it is printing a blank line.

Command:
sed -n '/test/{x;p;x;}; h' < /tmp/sedtest

File:
cat /tmp/sedtest
Yay
test
No
tset

Reply To This Comment

(why do I need your e-mail?)

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

Type the word "disk_273": (just to make sure you're a human)

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