/[sysadmin-cookbook]/bin/cook.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /bin/cook.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 83 - (show annotations)
Sun May 17 15:33:23 2009 UTC (10 years, 10 months ago) by dpavlin
File MIME type: application/x-sh
File size: 276 byte(s)
cook over ssh connection (add host as last argument)

1 #!/bin/sh
2
3 # small helper to cook the recepie (start prompt parts in shell)
4
5 test -e $1 || ( echo "usage: $0 recepises/something"; exit )
6
7 cat $1
8
9 ssh=''
10 if [ ! -z $2 ] ; then
11 ssh="ssh $2"
12 fi
13
14 grep '[a-z]*@[a-z]*:[^$#]*[$#]' $1 | cut -d\# -f 2 | $ssh xargs -i sh -x -c "{}"
15

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26