$ sed -n '58p' file.txt
The '-n' option suppresses printing of all lines
$ sed -n '58p' file.txt
$ rename 's/\s+/_/g' *.mp3
Renames all mp3 files, stripping off all spaces and substituting it with underscore.
#!/bin/sh
set `date`
echo "Time: $4 $5"
echo "Day: $1"
echo "Date: $3 $2 $6"
Returns:
Time: 01:33:02 EEST
Day: Sat
Date: 24 Jul 2005
The set command captures the positional parameters of `date` which has the format:
Sat Jul 24 01:33:02 EEST 2005
myscript.sh:
#!/bin/sh
echo $0 $1 $2 $3
$ ./myscript.sh Running Ubuntu Hoary
./myscript.sh Running Ubuntu Hoary
$* contains all the positional args
$# contains the number of arguments passed