Created
January 1, 2010 16:20
-
-
Save luisuribe/267152 to your computer and use it in GitHub Desktop.
shell shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Empty a file from the command line | |
$ cat /dev/null > t | |
// Use last parameter | |
$ ls /home/acme/norad | |
$ rm !$ | |
#Send a file as an attachment (ssmtp previously configured) | |
mpack -s "Un subject" un_fichero mailto:[email protected] [email protected] | |
# To extract a range of lines, say lines 2 to 4, you can execute either of the following (From http://linuxcommando.blogspot.com/2008/03/using-sed-to-extract-lines-in-text-file.html): | |
sed -n 2,4p somefile.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment