I have this folowwing code:
Code:
#!/bin/bash
dialog --title "Tunnel name" --backtitle "mod_gre tunneling script created by silviu -silviu@umbra.ro" \
--inputbox "Enter the name of the tunnel \nplease use whole words, no spaces alowed\nand try to keep at most 8\
characters" 8 60 > /tmp/input.$$
sel=$?
na=`cat /tmp/input.$$`
case $sel in
0) ifconfig > /root/grepin |grep -n $na /root/grepin > /root/grepout |cat /root/grepout ;;
1) echo "Cancel is Press" ;;
255) echo "[ESCAPE] key pressed" ;;
esac
rm -f /tmp/input.$$
i need to know where i do wrong, because the script is not giveing me anythig.
Code:
ifconfig > /root/grepin |grep -n $na /root/grepin > /root/grepout |cat /root/grepout
this command is working perfectly but putit in this script doesn't work
thx in advance