Linux hints
From my linux experience...
Tuesday, August 3, 2010
File extension in shell
FILENAME="file.txt"
To print file's extension:
$ echo ${FILENAME#*.}
txt
To print file name without extension:
$ echo ${FILENAME%.*}
file
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment