Name | Date | Size | ||
---|---|---|---|---|
.. | 26-Sep-2014 | 14 | ||
array-stuff | H A D | 11-Jun-2009 | 1.7 KiB | |
array-to-string | H A D | 11-Jun-2009 | 340 | |
autoload | H A D | 11-Jun-2009 | 2.8 KiB | |
autoload.v2 | H A D | 11-Jun-2009 | 3.9 KiB | |
autoload.v3 | H A D | 11-Jun-2009 | 2.5 KiB | |
basename | H A D | 11-Jun-2009 | 645 | |
basename2 | H A D | 11-Jun-2009 | 762 | |
coproc.bash | H A D | 11-Jun-2009 | 1.7 KiB | |
coshell.bash | H A D | 11-Jun-2009 | 2.2 KiB | |
coshell.README | H A D | 11-Jun-2009 | 1.5 KiB | |
csh-compat | H A D | 11-Jun-2009 | 834 | |
dirfuncs | H A D | 11-Jun-2009 | 2.5 KiB | |
dirname | H A D | 11-Jun-2009 | 573 | |
emptydir | H A D | 11-Jun-2009 | 599 | |
exitstat | H A D | 11-Jun-2009 | 620 | |
external | H A D | 11-Jun-2009 | 1.3 KiB | |
fact | H A D | 11-Jun-2009 | 309 | |
fstty | H A D | 11-Jun-2009 | 1 KiB | |
func | H A D | 11-Jun-2009 | 442 | |
gethtml | H A D | 11-Jun-2009 | 558 | |
getoptx.bash | H A D | 11-Jun-2009 | 8.9 KiB | |
inetaddr | H A D | 11-Jun-2009 | 1,004 | |
inpath | H A D | 11-Jun-2009 | 186 | |
isnum.bash | H A D | 11-Jun-2009 | 1.2 KiB | |
isnum2 | H A D | 11-Jun-2009 | 482 | |
isvalidip | H A D | 11-Jun-2009 | 301 | |
jdate.bash | H A D | 11-Jun-2009 | 2 KiB | |
jj.bash | H A D | 11-Jun-2009 | 111 | |
keep | H A D | 11-Jun-2009 | 1 KiB | |
ksh-cd | H A D | 11-Jun-2009 | 635 | |
ksh-compat-test | H A D | 11-Jun-2009 | 1.2 KiB | |
kshenv | H A D | 11-Jun-2009 | 4.2 KiB | |
login | H A D | 11-Jun-2009 | 127 | |
lowercase | H A D | 11-Jun-2009 | 545 | |
manpage | H A D | 11-Jun-2009 | 2.7 KiB | |
mhfold | H A D | 11-Jun-2009 | 349 | |
notify.bash | H A D | 11-Jun-2009 | 732 | |
pathfuncs | H A D | 11-Jun-2009 | 1.2 KiB | |
recurse | H A D | 11-Jun-2009 | 1.7 KiB | |
repeat2 | H A D | 11-Jun-2009 | 894 | |
repeat3 | H A D | 11-Jun-2009 | 283 | |
seq | H A D | 11-Jun-2009 | 528 | |
seq2 | H A D | 11-Jun-2009 | 814 | |
shcat | H A D | 11-Jun-2009 | 57 | |
shcat2 | H A D | 11-Jun-2009 | 174 | |
sort-pos-params | H A D | 11-Jun-2009 | 992 | |
substr | H A D | 11-Jun-2009 | 1.1 KiB | |
substr2 | H A D | 11-Jun-2009 | 1.4 KiB | |
term | H A D | 11-Jun-2009 | 480 | |
whatis | H A D | 11-Jun-2009 | 1 KiB | |
whence | H A D | 11-Jun-2009 | 990 | |
which | H A D | 11-Jun-2009 | 856 | |
xalias.bash | H A D | 11-Jun-2009 | 450 | |
xfind.bash | H A D | 11-Jun-2009 | 976 |
coshell.README
1Date: Fri, 21 Sep 2001 14:50:29 -0400 2From: "Jason M. Felice" <jfelice@cronosys.com> 3To: bash-maintainers@gnu.org, chet@po.cwru.edu 4Subject: Bash co-processes functions 5Message-ID: <20010921145029.A6093@argo.eraserhead.net> 6Mime-Version: 1.0 7 8Attached to this message you will find coprocess.bash and coshell.bash. 9Here's a brief synopsis of use: 10 11coprocess open telnet localhost 12while coprocess read il ; do 13 echo "$il" 14 case "$il" in 15 *ogin:*) 16 coprocess print 'user' 17 ;; 18 *ord:*) 19 echo 'pass' |coprocess print --stdin 20 ;; 21 *$ *) 22 coprocess print 'exit' 23 break 24 ;; 25 esac 26done 27coprocess close 28 29And here's an example of the coshell function: 30 31coshell open ssh -l root otherbox 32coshell eval hostname 33coshell ls -l 34if coshell test -d /tmp ; then echo 'otherbox has a /tmp!' ; fi 35 36coshell sendfile /var/lib/upgrade.rpm /tmp/test.rpm || exit $? 37coshell eval rpm -ivh /tmp/test.rpm || exit $? 38coshell eval rm -f /tmp/test.rpm || exit $? 39coshell close 40exit 0 41 42There are a few minor issues that I'd like to work out, but it works well 43enough for me ;-) The issues are: 44 45- Shell quoting issue with 'coshell eval' commands - need to somehow 46 re-quote words. 47- Interactive commands hang 'coshell eval', tried redirecting in </dev/null 48 to executed command, but it caused strange shell exit problems. 49- Some way to copy stdin from local coshell eval to remote shell. Probably 50 logically impossible, but would be wonderfully useful. 51 52I'm using it for writing scripts to publish websites and other scripts to 53co-located servers. 54