commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Will print the host associated with the current stdin.
This is useful to set the DOIT_SERVER for the doit remote execution agent ( http://www.chiark.greenend.org.uk/~sgtatham/doit/ )
export DOIT_HOST=$(who -m | sed 's/.*(\(.*\)).*/\1/')
Note that SSH_CLIENT variable can be lost if you use su or sudo (if set to reset vars)
There is 1 alternative - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.