Returns the last file extension in the file name
echo "thisfile.txt.log"awk -F . '{print $NF}' # returns "log"
http://liquidat.wordpress.com/2007/09/29/short-tip-get-file-extension-in-shell-script/
Subscribe to:
Post Comments (Atom)
Information about various Linux / UNIX / OS X topics
No comments:
Post a Comment