sed command Problem
Hi,
I am trying to change a file name that is generated by the computer but cannot get it right using sed. eg. Currently I have a file named ABSS12E1-out-qasyt.123.txt Using Sed 's[^S..E.]*/\1/' I can get this output -out-qasyt.123.txt However what I want is ABSS12E1 Can anyone post the problem with my sed command. Thanks for looking, if you can help great, it's been bugging me for days. |
Code:
echo "ABSS12E1-out-qasyt.123.txt" | sed 's/-.*//' |
echo ABSS12E1-out-qasyt.123.txt|cut -d'-' -f1
|
All times are GMT -5. The time now is 05:48 PM. |