• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CGIs with OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: CGIs with OSX (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: Saving as HTML in Word 2001
  • Next by Date: Re: Admin
  • Previous by thread: Re: CGIs with OSX
  • Next by thread: Re: CGIs with OSX
  • Index(es):
    • Date
    • Thread