Check These Out
Delete a range of line
Query Wikipedia by issuing a DNS query for a TXT record. The TXT record will also include a short URL to the complete corresponding Wikipedia entry.You can also write a little shell script like:
$ $ cat wikisole.sh
$ #!/bin/sh
$ dig +short txt ${1}.wp.dg.cx
and run it like
$ ./wikisole.sh unix
were your first option ($1) will be used as search term.
Command is properly working on HP-UX 11.31
the 'set -x' mode can be exited by typing
$ set +x
Intended for dynamic ip OpenDNS users, this command will update your OpenDNS network IP.
For getting your IP, you can use one of the many one-liners here on commandlinefu.
Example:
I use this in a script which is run by kppp after it has successfully connected to my ISP:
---
#!/bin/bash
IP="`curl -s http://checkip.dyndns.org/ | grep -o '[[:digit:].]\+'`"
PW="hex-obfuscated-pw-here"
if [ "$IP" == "" ] ; then echo 'Not online.' ; exit 1
else
wget -q --user=topsecret --password="`echo $PW | xxd -ps -r`" 'https://updates.opendns.com/nic/update?hostname=myhostname&myip='"$IP" -O -
/etc/init.d/ntp-client restart &
fi
---
PS: DynDNS should use a similar method, if you know the URL, please post a comment. (Something with members.dyndns.org, if I recall correctly)
usage examples
ls largedir |rd
lynx -dump largewebsite.com |rd
rd < largelogfile
Command binds a set of commands to the F12 key.
Feel free to alter the dashboard according to your own needs.
How to find the key codes?
Type
$ read
Then press the desired key (example: F5)
$ ^[[15~
Try
$ bind '"\e[15~"':"\"ssh su@ip-address\C-m"""
or
$ bind '"\e[16~"':"\"apachectl -k restart\C-m"""
THIS COMMAND IS DESTRUCTIVE. That said, lets assume you want to render your boot drive unbootable and reboot your machine. Maybe you want it to boot off the network and kickstart from a boot server for a fresh OS install. Replace /dev/fd0 with the device name of your boot drive and this DESTRUCTIVE command will render your drive unbootable. Your BIOS boot priority should be set to boot from HD first, then LAN.