echo “you are a idiot ...”
#!/bin/sh
gnome-terminal
gnome-terminal -e <command>
gnome-terminal -e echo "you are a genius"
gnome-terminal -e gnome-terminal
gnome-terminal -x bash -c "echo 'you are a genius'; exec bash"
--help
查询。if [ -f /etc/mentohust/8021x.exe]; then echo "/etc/mentohust/ do exist"; else echo "/etc/mentohust/ do not exist"; fi
-f
与其前的大括号[
间隔一个空格;结尾一定要加上结尾标志fi
echo <password> | sudo -S <command>
|
是管道命令,即将一个进程的标准输出流与另一个进程的标准输入流连接起来。' " `
'
"
`
锐捷付费上网代码
#!/bin/sh
if [ -f /etc/mentohust/8021x.exe ]; then
echo "/etc/mentohust/ do exist";
echo "execute RuiJieCharged application -- mentohust";
gnome-terminal -x bash -c "echo sjc | sudo -S mv /etc/mentohust/ /etc/mentohust.bak/ && sudo -S mentohust -u2010301563 -pbxsjc0728 -np5p1 -a1 -d3 -w; exec bash";
else
echo "/etc/mentohust.bak/ do exist";
echo "execute RuiJieCharged application -- mentohust";
gnome-terminal -x bash -c "echo sjc | sudo -S mentohust -u2010301563 -pbxsjc0728 -np5p1 -a1 -d3 -w; exec bash";
fi
锐捷免费上网代码
#!/bin/sh
if [ -f /etc/mentohust/8021x.exe ]; then
echo "/etc/mentohust/ do exist";
echo "execute RuiJieFree applicantion";
gnome-terminal -x bash -c "echo sjc | sudo -S /home/aerosjc/Downloads/mentonpu/mnfree -u2010301563 -pbxsjc0728 -np5p1 -a1 -d3; exec bash";
echo "execute SouGou Proxy";
gnome-terminal -x bash -c "/home/aerosjc/Downloads/mentonpu/proxy.py; exec bash";
echo "execute Google-Chrome";
gnome-terminal -x bash -c "google-chrome --proxy-server=localhost:1998; exec bash";
else
echo "/etc/mentohust.bak/ do exist";
echo "execute RuiJieFree applicantion";
gnome-terminal -x bash -c "echo sjc | sudo -S mv /etc/mentohust.bak/ /etc/mentohust/ && sudo -S /home/aerosjc/Downloads/mentonpu/mnfree -u2010301563 -pbxsjc0728 -np5p1 -a1 -d3; exec bash";
echo "execute SouGou Proxy";
gnome-terminal -x bash -c "/home/aerosjc/Downloads/mentonpu/proxy.py; exec bash";
echo "execute Google-Chrome";
gnome-terminal -x bash -c "google-chrome --proxy-server=localhost:1998; exec bash";
fi