bourne sh, problems with var setting in case/esac
news at usenet.ins.cwru.edu
news at usenet.ins.cwru.edu
Fri Nov 16 02:56:04 AEST 1990
In article <1236 at netmuc.UUCP> bothe at net7.uucp writes:
>if i don't pipe esac and not use cat, all is ok, but i want to pipe !
In the immortal words of Guy Harris (or is that the words of the immortal
Guy Harris? :-):
``You've been zapped by Mr. Subshell''
Sh runs control structures with pipes in a subshell. Variables set in a
subshell cannot affect the parent's settings.
Chet
--
Chet Ramey ``I die, Horatio''
Network Services Group, Case Western Reserve University
chet at ins.CWRU.Edu
My opinions are just those, and mine alone.
More information about the Comp.unix.shell
mailing list