I have an http link :
http://www.test.com/abc/def/efg/file.jar
and I want to save the last part file.jar to variable, so the output string is "file.jar".
Condition: link can has different length e.g.:
http://www.test.com/abc/def/file.jar.
I tried it that way:
awk -F'/' '{print $7}'
, but problem is the length of URL, so I need a command which can be used for any URL length.