csh and I/O redirection
Jeff Glass
jjg at security.UUCP
Wed Jul 3 07:47:21 AEST 1985
put these four lines in a file, say cshtest :
#! /bin/csh -f
cat << END | ( sh & )
echo hi there
END
( the intent is to send some commands to sh to be executed in the background,
without csh printing the job number of the sh. )
now, from csh, enter the command
source cshtest
and note that you see the message "hi there".
now enter the commands
chmod +x cshtest
./cshtest
nothing happens.
removing either the parentheses or the ampersand causes the message to appear,
but not quietly in the background. I don't understand why it works when
source'd but not when exec'd, either.
/jeff
--
security!jjg at mitre-bedford.ARPA (MIL)
{allegra,ihnp4,utzoo,philabs,uw-beaver}!linus!security!jjg (UUCP)
More information about the Comp.unix.wizards
mailing list