We have a file with entries like
good/bad/ugly.
We are able to retrieve the last bit(ugly) with
sed -e 's/.*\///g' testfilelist.txt
But we wish to achieve the same by creating 'data regions'.
We are trying
sed -e 's/(.*/)([^/]\+)$/\2/g' testfilelist.txt
But we are getting
sed: -e expression #1, char 12: Unknown option to `s'.
How do we print out the first ,second and third entries in the line above by using this approach?
good/bad/ugly.
We are able to retrieve the last bit(ugly) with
sed -e 's/.*\///g' testfilelist.txt
But we wish to achieve the same by creating 'data regions'.
We are trying
sed -e 's/(.*/)([^/]\+)$/\2/g' testfilelist.txt
But we are getting
sed: -e expression #1, char 12: Unknown option to `s'.
How do we print out the first ,second and third entries in the line above by using this approach?