Bash tips and trick
Sunday, February 12, 2006
${filename%.*} Extracting the filename by stripping off the file extension
$ FN="filename.jsp
$ echo ${FN%.*}
filename
posted by Arthur Kho Caayon at
1:58 AM
0 Comments:
Post a Comment
<< Home
Previous Posts
${filename##*.} Extracting the file extension of f...
${#string} Getting the length of a string
${var=default} If var is not set, set it to default
${var-default} If var is not set, use a default
If arg is empty print the current working director...
How to get the parent directory of a folder
Special characters and operators
Print only line 58 of a text file: $ sed -n '58...
Batch renaming of files$ rename 's/\s+/_/g' *.mp3R...
The set command#!/bin/shset `date`echo "Time: $4 $...
0 Comments:
Post a Comment
<< Home