• 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: Another shell script query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another shell script query


  • Subject: Re: Another shell script query
  • From: Christopher Nebel <email@hidden>
  • Date: Thu, 6 Jun 2002 10:47:09 -0700

On Thursday, June 6, 2002, at 04:33 AM, Simon Kornblith (Mailing Lists) wrote:

On 6/6/02 6:16 AM, "Charles Arthur" <email@hidden> wrote:

Obviously I'd be interested in the "other ways", just out of idle
curiosity. Simon's idea of error-trapping did seem the safest (in that it
would catch dire fallovers) but "||" is very intriguing. ...

Any more sneaky Unix tricks like "||" welcome here, anyway.

Actually, the proper way to direct stderr to stdout would probably be "curl
--help 2>&1", which simply directs stderr (file descriptor 2) to stdout
(file descriptor 1) without going through any additional applications.

True, but unrelated. curl --help writes everything to stdout; the problem is that it returns a failure status and you have to either suppress that in the shell script (as above) or deal with the error in the AppleScript somehow.

One of my favorite sneaky UNIX tricks is the following...

-- Use << and a very large string...

That's a pretty good one, though I'd consider your delimiter excessively paranoid. For all the details on file redirection stunts, including a number of nifty tricks with "here documents", read the "Redirections" section in the "sh" man page.


--Chris Nebel
AppleScript Engineering
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Another shell script query (From: "Simon Kornblith (Mailing Lists)" <email@hidden>)

  • Prev by Date: Re: Another shell script query
  • Next by Date: Re: Another shell script query
  • Previous by thread: Re: Another shell script query
  • Next by thread: Re: Another shell script query
  • Index(es):
    • Date
    • Thread