sed -e 's,/.*/,,'
What does this s, substitution do?
sed -e 's,/.*/,,'
What does this s, substitution do?
removes all directories before filename assuming absolute path of filename is given , equivalent of basename command but doesn't handle relative paths
Try this and you will know what it does
echo "/ab/abc/abcd"| sed 's,/.*/,,'
Hi,
Here the separator is /
sed 's/a/e/g' file
Here the separator is ,
sed 's,a,e,g' file
Both the above statements are same.
Cheers,
Ranga:)
@rangarasan : he is correct in his words ,
Here seperator used is , instead of / . since / may conflict with directory search.