diff options
author | Chet Ramey <chet.ramey@case.edu> | 2014-02-25 20:36:50 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2014-02-25 20:36:50 -0500 |
commit | 4539d736f1aff232857a854fd2a68df0c98d9f34 (patch) | |
tree | 841c9a36d28c9a4d61c1b2d79524ccbe5f5c5029 /examples/functions/coshell.README | |
parent | f281b8f4f8936b2713966274d9f8508a9f0910e4 (diff) | |
download | android_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.tar.gz android_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.tar.bz2 android_external_bash-4539d736f1aff232857a854fd2a68df0c98d9f34.zip |
prep for bash-4.3 release
Diffstat (limited to 'examples/functions/coshell.README')
-rw-r--r-- | examples/functions/coshell.README | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/examples/functions/coshell.README b/examples/functions/coshell.README deleted file mode 100644 index 9675cda..0000000 --- a/examples/functions/coshell.README +++ /dev/null @@ -1,53 +0,0 @@ -Date: Fri, 21 Sep 2001 14:50:29 -0400 -From: "Jason M. Felice" <jfelice@cronosys.com> -To: bash-maintainers@gnu.org, chet@po.cwru.edu -Subject: Bash co-processes functions -Message-ID: <20010921145029.A6093@argo.eraserhead.net> -Mime-Version: 1.0 - -Attached to this message you will find coprocess.bash and coshell.bash. -Here's a brief synopsis of use: - -coprocess open telnet localhost -while coprocess read il ; do - echo "$il" - case "$il" in - *ogin:*) - coprocess print 'user' - ;; - *ord:*) - echo 'pass' |coprocess print --stdin - ;; - *$ *) - coprocess print 'exit' - break - ;; - esac -done -coprocess close - -And here's an example of the coshell function: - -coshell open ssh -l root otherbox -coshell eval hostname -coshell ls -l -if coshell test -d /tmp ; then echo 'otherbox has a /tmp!' ; fi - -coshell sendfile /var/lib/upgrade.rpm /tmp/test.rpm || exit $? -coshell eval rpm -ivh /tmp/test.rpm || exit $? -coshell eval rm -f /tmp/test.rpm || exit $? -coshell close -exit 0 - -There are a few minor issues that I'd like to work out, but it works well -enough for me ;-) The issues are: - -- Shell quoting issue with 'coshell eval' commands - need to somehow - re-quote words. -- Interactive commands hang 'coshell eval', tried redirecting in </dev/null - to executed command, but it caused strange shell exit problems. -- Some way to copy stdin from local coshell eval to remote shell. Probably - logically impossible, but would be wonderfully useful. - -I'm using it for writing scripts to publish websites and other scripts to -co-located servers. |