If Argument $1 is supplied, assign it to variable. Otherwise continue on.
Run a nohup script in background launched trough a shell script without interrupting the main shell script execution.
This command sent the Python version to a file. This is intended to be used in scripts. For some reason, simple redirections didn't work with "python -V" Show Sample Output
In this example, I’m creating a wrapper for apt-get that assumes yes every time — but the command could be anything.
After installing Termbeamer (see termbeamer.com) you can use it to share a terminal session with one or more others even from behind a firewall or NAT.
solution that works for me
More direct like this Show Sample Output
Very useful for test a script. After launch this command, you only have to press ENTER for launch your script again. I work with screen and tape ENTER instead of '!!'+ENTER If you break your script with CTRL-C, it will wait for press ENTER and will re-launch You can write like it : while read -p "Press ENTER" ; do python ; done
You can use this to loop any command to periodically see the output.
while true; do [YOUR COMMAND HERE]; sleep [# of seconds]; done;
Alternatively, you can put it in a simple shell script to save typing!
#/!bin/bash
while true; do $1; sleep $2; done;
/path/to/script.sh "ifconfig eth0 | grep 'inet addr:'" 60
Show Sample Output
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: