Bash tips and trick
Sunday, February 12, 2006
${filename##*.} Extracting the file extension of filename
$ FN="FileName.jsp"
$ echo ${FN#*.}
jsp
posted by Arthur Kho Caayon at
1:53 AM
0 Comments:
Post a Comment
<< Home
Previous Posts
${#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 $...
Positional parametersmyscript.sh:#!/bin/shecho $0 ...
0 Comments:
Post a Comment
<< Home