Re: CGIs with OSX
Re: CGIs with OSX
- Subject: Re: CGIs with OSX
- From: John W Baxter <email@hidden>
- Date: Mon, 2 Apr 2001 19:44:45 -0700
At 11:31 +1000 4/3/01, Timothy Bates wrote:
>
So it makes it clear that it accepts strings (std in) but neglects to
>
mention that you need to QUOTE the string.
The command line is not stdin. The command line stuff is parsed by the
shell (much less so when inside ' quotes; somewhat less when inside
"...that is the "..." construct is less strongly protective) and turned
into an array of strings to which the program receives a pointer.
stdin is a file-like thing from which the app reads data. It may be a
file, it may be the user typing, and there are several other choices.
In
echo '7+2' | /usr/bin/osascript
it happens that the string 7+2<newline> produced by echo is the contents of
the file-like thing read by osascript after it discovers that the only
thing in its argument array is "/usr/bin/osascript".
That example prints 9, by the way.
--
John Baxter email@hidden Port Ludlow, WA, USA