Tuesday, January 29, 2013

create menu in terminal with TPUT

for more information about tput type
man tput
tput --help


[1] rangers>> cat > tput.sh
                       "copy script here"

[2] and hit ctrl+d (save your tput.sh)

[3] rangers>>chmod 777 tput.sh
------------------------------------------------------------
tput clear
tput cup 5 40
tput bold
tput rev
tput setaf 1
echo "opensours-code.blogspot.com "
tput sgr0
tput cup 8 40
echo "[1] smartfren internet"
tput sgr0
tput cup 10 40
echo "[2] open firefox browser"
tput sgr0
tput cup 12 40
echo "[3] D.A.1 tools"
tput sgr0
tput cup 14 40
echo "[4] interface config"
tput bold
tput cup 16 40
echo -n "enter your choice :"
read fg;
if [ $fg == 1 ]; then
./smart.sh
elif [ $fg == 2 ]; then
firefox
elif [ $fg == 3 ]; then
./dat.sh
elif [ $fg == 4 ]; then
ifconfig
else
tput cup 18 40
echo "fuck you ashole"
fi
tput sgr0

i just make some menu for myself ,you can modify this scrip and save it,,,

Sunday, January 20, 2013

bash shell case statement

this is a very simple script and great help,
you just enter your keyword and the application will run.
very helpful for those of you who remember the difficult keywords inside the terminal. i made for my own purposes,and you can make your own version,using bash shell case statement



Saturday, January 19, 2013