Check These Out
Scrape the National Weather Service
Maybe you know shorter ?
you can put almost any command.
$notify-send -t 0 "MOTD" "$(sed -n '/#^4/,/#$4/{/#^4\|#$4/!p}' motd2 | cut -d# -f2)"
$notify-send -t 0 "readfile" "$(while read mess; do echo $mess;done < motd2)"
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"
!# is the currennt line so far, by using !#:- you can go from the second arg (it's zero indexed) to the last ($)
(did I understand the problem correctly?)
Using this command you can track a moment when usb device was attached.
This command will find all occurrences of one or more patterns in a collection of files and will delete every line matching the patterns in every file
$ sleep 1h ; sudo command
or
$ sudo sleep 1h ; sudo command
won't work, because by the time the delay is up, sudo will want your password again.
"What it actually shows is going to be dependent on the commands you've previously entered.
When you do this, bash looks for the last command that you entered that contains the substring "ls", in my case that was "lsof ...". If the command that bash finds is what you're looking for, just hit Enter to execute it. You can also edit the command to suit your current needs before executing it (use the left and right arrow keys to move through it).
If you're looking for a different command, hit Ctrl+R again to find a matching command further back in the command history. You can also continue to type a longer substring to refine the search, since searching is incremental.
Note that the substring you enter is searched for throughout the command, not just at the beginning of the command." - http://www.linuxjournal.com/content/using-bash-history-more-efficiently
Most people know that you can run a PHP script from the command line like so:
$php ./my_script.php
But sometimes I just want to run a quick bit of code, the PHP Command Line Interface allows me to do so with the -r option.
Requires package php5-cli