[solved]Help with a sed command

view full story

http://www.unix.com – So I have a bunch of strings in a file. Example Line ./prcol/trt/conf/conf-app/jobdefinition/trt-pre-extr-trt-step.jdef Intended Result pre-extr-trt-step So far I have parsed it out to the last bit, Code: echo $line | cut -d'/' -f7 | cut -d. -f1 Result trt-pre-extr-trt-step So I added a sed to just strip out the first occurrence, (or tried) Code: echo $line | cut -d'/' -f7 | cut -d. -f1 | sed '0,/trt-/s/trt-//' Result trt-pre-extr-trt-step It should have been, pre-extr-trt-step Can anyone see what I screwed up? ---------- Post updated at 03:25 PM ---------- Previous update (HowTos)