[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
coproc command doesn't accept NAME arg
From: |
Tim Hatch |
Subject: |
coproc command doesn't accept NAME arg |
Date: |
Tue, 24 Feb 2009 13:38:53 -0800 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: darwin9.6.0
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -
DCONF_OSTYPE='darwin9.6.0' -DCONF_MACHTYPE='i386-apple-darwin9.6.0' -
DCONF_VENDOR='apple' -DLOCALEDIR='/usr/local/share/locale' -
DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DMACOSX -I. -I. -I./
include -I./lib -I./lib/intl -I/Users/tim/tmp/bash-4.0/lib/intl -g -O2
uname output: Darwin Pilot.hq.nutricateonline.com 9.6.0 Darwin Kernel
Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/
RELEASE_I386 i386
Machine Type: i386-apple-darwin9.6.0
Bash Version: 4.0
Patch Level: 0
Release Status: release
Description:
Reading the changelog, I was curious how the 'coproc' builtin
behaves. I
tried two commands, 'coproc ls' and 'coproc NAME ls' They both
appear to
use a NAME of 'COPROC', with the second attempting to run NAME (see the
last line of the output for what it's actually running).
My understanding of NAME comes from how it's used in the 'read'
command,
but I might be doing it wrong.
Repeat-By:
Pilot:~/tmp/bash-4.0 tim$ help coproc
coproc: coproc [NAME] command [redirections]
Create a coprocess named NAME.
Execute COMMAND asynchronously, with the standard output and
standard
input of the command connected via a pipe to file descriptors
assigned
to indices 0 and 1 of an array variable NAME in the executing
shell.
The default NAME is "COPROC".
Exit Status:
Returns the exit status of COMMAND.
Pilot:~/tmp/bash-4.0 tim$ coproc NAME ls
[1] 18474
Pilot:~/tmp/bash-4.0 tim$ ./bash: line 32: NAME: command not found
[1]+ Exit 127 coproc COPROC NAME ls
- coproc command doesn't accept NAME arg,
Tim Hatch <=