Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

translate this send into perl

7 views
Skip to first unread message

sfgr...@gmail.com

unread,
Mar 16, 2005, 3:08:47 PM3/16/05
to
How will I do this in perl?


print 1 line of context before and after regexp, with line number
# indicating where the regexp occurred (similar to "grep -A1 -B1")
sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h

Thanks
Sundaram

Red

unread,
Mar 16, 2005, 4:54:48 PM3/16/05
to

See the documentation for s2p: perldoc s2p
I think this will do what you want.

Regards,
Rob.

0 new messages