sed: How to remove the end of a line?
Hello,
I need to remove the end of a line, so for this I think that sed will do the job but i didn't manage to do that. here is a sample of my input: Code:
/client/1388a/Screen Shot-21_10_2006.PNG Code:
/client/1388a/ Here is what I use so far: Code:
sed -e 's/[\ a-z0-9A-Z\.\_\-]*$//g' |
If in a variable:
Code:
% v="/client/1388a/Screen Shot-21_10_2006.PNG" Code:
% sed 's /[^/]*$ / ' <(echo "/client/1388a/Screen Shot-21_10_2006.PNG") |
Quote:
Code:
$ dirname "/client/1388a/Screen Shot-21_10_2006.PNG" |
All times are GMT -5. The time now is 09:15 PM. |