Bash tips and trick
Friday, July 29, 2005
Print only line 58 of a text file:
$ sed -n '58p' file.txt
The '-n' option suppresses printing of all lines
posted by Arthur Kho Caayon at
1:37 AM
0 Comments:
Post a Comment
<< Home
Previous Posts
Batch renaming of files$ rename 's/\s+/_/g' *.mp3R...
The set command#!/bin/shset `date`echo "Time: $4 $...
Positional parametersmyscript.sh:#!/bin/shecho $0 ...
Ignore case in grep$ grep -i 'camelCaseWhatever' f...
sed: Swap two words around$ cat testfirst:secondon...
sed: Enclose a word in angle-bracketss/html/<&>/re...
Delete all lines in a file that begins with 'O'$ca...
Strip off file extension${filename%.*}Example:$ fi...
Set cdable directories
Searching the command history1) Press Ctrl-R at th...
0 Comments:
Post a Comment
<< Home