• Home
  • History
  • Annotate
  • only in this directory
NameDateSize

..19-Apr-201314

array-stuffH A D11-Jun-20091.7 KiB

array-to-stringH A D11-Jun-2009340

autoloadH A D11-Jun-20092.8 KiB

autoload.v2H A D11-Jun-20093.9 KiB

autoload.v3H A D11-Jun-20092.5 KiB

basenameH A D11-Jun-2009645

basename2H A D11-Jun-2009762

coproc.bashH A D11-Jun-20091.7 KiB

coshell.bashH A D11-Jun-20092.2 KiB

coshell.READMEH A D11-Jun-20091.5 KiB

csh-compatH A D11-Jun-2009834

dirfuncsH A D11-Jun-20092.5 KiB

dirnameH A D11-Jun-2009573

emptydirH A D11-Jun-2009599

exitstatH A D11-Jun-2009620

externalH A D11-Jun-20091.3 KiB

factH A D11-Jun-2009309

fsttyH A D11-Jun-20091 KiB

funcH A D11-Jun-2009442

gethtmlH A D11-Jun-2009558

getoptx.bashH A D11-Jun-20098.9 KiB

inetaddrH A D11-Jun-20091,004

inpathH A D11-Jun-2009186

isnum.bashH A D11-Jun-20091.2 KiB

isnum2H A D11-Jun-2009482

isvalidipH A D11-Jun-2009301

jdate.bashH A D11-Jun-20092 KiB

jj.bashH A D11-Jun-2009111

keepH A D11-Jun-20091 KiB

ksh-cdH A D11-Jun-2009635

ksh-compat-testH A D11-Jun-20091.2 KiB

kshenvH A D11-Jun-20094.2 KiB

loginH A D11-Jun-2009127

lowercaseH A D11-Jun-2009545

manpageH A D11-Jun-20092.7 KiB

mhfoldH A D11-Jun-2009349

notify.bashH A D11-Jun-2009732

pathfuncsH A D11-Jun-20091.2 KiB

recurseH A D11-Jun-20091.7 KiB

repeat2H A D11-Jun-2009894

repeat3H A D11-Jun-2009283

seqH A D11-Jun-2009528

seq2H A D11-Jun-2009814

shcatH A D11-Jun-200957

shcat2H A D11-Jun-2009174

sort-pos-paramsH A D11-Jun-2009992

substrH A D11-Jun-20091.1 KiB

substr2H A D11-Jun-20091.4 KiB

termH A D11-Jun-2009480

whatisH A D11-Jun-20091 KiB

whenceH A D11-Jun-2009990

whichH A D11-Jun-2009856

xalias.bashH A D11-Jun-2009450

xfind.bashH A D11-Jun-2009976

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