How to cut the last field in this shell string
LINE="/string/to/cut.txt"
So that the string would look like this
LINE="/string/to/"
Thanks in advance!
For what it's worth, a cut
-based solution:
NEW_LINE="`echo "$LINE" | rev | cut -d/ -f2- | rev`/"