• 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: Graff <email@hidden>
  • Date: Wed, 21 Apr 2004 11:23:39 -0400

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

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

- Ken

On Apr 21, 2004, at 6:13 AM, Simon Forster wrote:

How can I "do shell script" with more than 1 line. More specifically, how can I do the equivalent of:

python
>>> import sys
>>> sys.path

from within do shell script?

Actually, I only want to do this to check that an environment variable set in ~/.bashrc is also set in whatever environment "do shell script" runs under. The real goal is to import a module and run one of its functions with a supplied argument, all from "do shell script". So if you could let me know how to do this, I'd be eternally grateful (well, until the next issue giving me large bumps on head and associated headache crops up ;-)
_______________________________________________
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: Christopher Nebel <email@hidden>
References: 
 >Multi-line do shell script. How? (From: Simon Forster <email@hidden>)

  • Prev by Date: Re: QXP5 - A matter of facing pages and bounds of selected objects
  • Next by Date: Re: Create list of lists?
  • Previous by thread: Re: Multi-line do shell script. How?
  • Next by thread: Re: Multi-line do shell script. How?
  • Index(es):
    • Date
    • Thread