how to remove path using sed
I am trying to remove the path name and only get the file name
when I do this on the prompt it works:
cat a.txt | sed "s/.*\///"
when I do it from a script:
f=`cat $file | sed s/.*\///`
echo $f
it gives me an error:
sed: -e expression #1, char 7: unknown option to `s'
what am I doing wrong?
|