Using Bash Scripts to Slack Off
ck3k-ck3k@ck3k.org 2/24/04
Ok, you all know how to make .bat files for windows, now lets check out bash scripts that allow multiple cmds to be run from a single keystroke, in linux
first open a text file in your fav. text editor. I use nano but you can use whatever.
add the following
#!/bin/bash
#
/path/to/program
save the file to /usr/local/bin
keep the name simple like "noodle"
so you will remember what to type to execute it on a term.
now chmod to the file to make it executable for the system
"chmod a+x noodle"
type noodle at your nearest term, and bam insta cmd
i made a few simple things, mainly for slackers (me) that don't want to type in alot of cmds to do one thing.
examples
"snortstart"
#!/bin/bash
#
dhcpcd eth1
snort -i eth1 -A console -c /etc/snort/snort.conf
"warstart"
#!/bin/bash
#
cd /usr/local/mysql
bin/mysqld_safe --user=mysql &
cd /
/usr/local/bin/gpsd -p /dev/ttyUSB0
/usr/local/bin/kismet_monitor
/usr/local/bin/kismet_hopper
-v 10 &
/usr/local/bin/kismet_server &
/usr/X11R6/bin/xterm -e
/usr/local/bin/kismet &
/usr/X11R6/bin/xterm -e /usr/local/bin/kismet
&
/usr/X11R6/bin/xterm -e /usr/local/bin/gpsdrive &