⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 coshell.readme

📁 android-w.song.android.widget
💻 README
字号:
Date: Fri, 21 Sep 2001 14:50:29 -0400From: "Jason M. Felice" <jfelice@cronosys.com>To: bash-maintainers@gnu.org, chet@po.cwru.eduSubject: Bash co-processes functionsMessage-ID: <20010921145029.A6093@argo.eraserhead.net>Mime-Version: 1.0Attached to this message you will find coprocess.bash and coshell.bash.Here's a brief synopsis of use:coprocess open telnet localhostwhile coprocess read il ; do  echo "$il"  case "$il" in    *ogin:*)      coprocess print 'user'      ;;    *ord:*)      echo 'pass' |coprocess print --stdin      ;;    *$ *)      coprocess print 'exit'      break      ;;  esacdonecoprocess closeAnd here's an example of the coshell function:coshell open ssh -l root otherboxcoshell eval hostnamecoshell ls -lif coshell test -d /tmp ; then echo 'otherbox has a /tmp!' ; ficoshell 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 closeexit 0There are a few minor issues that I'd like to work out, but it works wellenough 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 toco-located servers.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -