Markham, Richard wrote: > Thanks for all the excellent examples, I learned a whole lot more than I > bargained for. > I am currently working on converting korn scripts that I have written > over to PERL > for the experience. The following has me stumped, dealing with a sed > conversion I am > attempting: > > example: > $ echo "a test line to grep and return specific pattern only" | sed -n > -e '/test.*to.*grep/s/.*\(test.*grep\).*/\1/p' > test line to grep > > with the above, in a case where many strings are similar but not exact > in a file, this sed command saved the exact pattern from the first sed > search output. Kinda like two seds in one. > > so in conclusion, the following echo would not return a line as ~expected~: > $ echo "a test line for grep functions" | sed -n -e > '/test.*to.*grep/s/.*\(test.*grep\).*/\1/p' > > Now the question is how do I do the similar with Perl ? > TIA for bearing with me =).
Have you tried using s2p in your .../perl/bin dir ? -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (Free site for Perl/Lakers) _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs