But nothing gets captured in $hier. When i execute this in shell on the same file, i get proper o/p:$mod = "ABC "; $hier = `tac temp.xx | sed -n '/$mod /,/YYY/ p'| grep XXX`;
What i am trrying to do: Search for a string "ABC " in the file Back track till i find "YYY" Print that line w YYY%tac temp.xx | sed -n '/ABC /,/YYY/ p' | grep XXX XXX ZZZZ
In reply to Sed in perl by abhay180
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |