Posts Tagged ‘ssh

Bash има опция, която ако не се лъжа се нарича “пренасочване на входа”. Т.е. нещо подобно на това:

#!/bin/sh
mysql -u tsurko -p mydb

myssh

In: ALL

20 Aug 2007

Винаги съм искал да спестявам по малко време когато използвам ssh, като не се налага да пиша целия hostname на машината, в която искам да се логна. И днес си написах един скрипт, който прави нещо такова. Ето го и него:
#!/bin/sh
LIST=/root/myssh.list
if [ $# -ne 1 ]
then
echo “Usage: myssh ”
exit 127
fi
SERVER=`cat $LIST | grep $1 [...]


-->
  • ALBERTO: CheapTabletsOnline.Com. [...]
  • door: with http://ihaydenqqlfhcc.05KIAPARTS.US/tag/sears+door+with/ : with... with... [...]
  • industries: industries http://smscxxw.01DODGEPARTS.US/tag/eyeglasses+frames+industries/ : frames... [...]
  • Lens: adapters http://bfridaypiwoq.AACEHARDWARE.INFO/tag/astroscope+adapters+letus35+Lens/ : adap [...]
  • VICTOR: MedicamentSpot.com. Canadian [...]

Quotes

"The most beautiful thing we can experience is the mysterious. It is the source of all true art and science."
Albert Einstein
~~~
"The skill of writing is to create a context in which other people can think."
Edwin Schlossberg