• 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: Multi-line do shell script. How?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-line do shell script. How?


  • Subject: Re: Multi-line do shell script. How?
  • From: Christopher Nebel <email@hidden>
  • Date: Wed, 21 Apr 2004 14:52:22 -0700

On Apr 21, 2004, at 8:23 AM, Graff wrote:

If all you want to do is to check your environment variables then just do this:
do shell script "declare"

Maybe on your system, but not a standard one. Try 'do shell script "set"' instead.

If you want to know the value of any single environment variable, such as PATH, you can do:
do shell script "echo $PATH"

Of course, this gives you your environment as sh knows it; you can use 'system attribute' to get the environment as the application knows it. (sh adds a bunch of its own stuff.) For example, 'system attribute "PATH"' returns your PATH; 'system attribute' with no parameters returns a list of all defined variable names.


--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.


  • Follow-Ups:
    • Re: Multi-line do shell script. How?
      • From: Graff <email@hidden>
References: 
 >Multi-line do shell script. How? (From: Simon Forster <email@hidden>)
 >Re: Multi-line do shell script. How? (From: Graff <email@hidden>)

  • Prev by Date: Re: AppleScript mystery
  • Next by Date: Re: Multi-line do shell script. How?
  • Previous by thread: Re: Multi-line do shell script. How?
  • Next by thread: Re: Multi-line do shell script. How?
  • Index(es):
    • Date
    • Thread