• 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
do shell script undesired behaviour (!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

do shell script undesired behaviour (!)


  • Subject: do shell script undesired behaviour (!)
  • From: julifos <email@hidden>
  • Date: Mon, 15 Nov 2010 10:39:22 +0100
  • Thread-topic: do shell script undesired behaviour (!)

Hi all!

It's a long time since I don't read anymore applescript release notes nor
I'm up-to-date with latest changes in the language.

But I'm so surprised with this (for me) new behaviour that I thought I
should share it, just in case someone isn't aware or just in case it's a bug
in my system (10.6.4, intel).

See this code:

----------------
do shell script "cd /BAD/PATH; ls -la"
----------------

Previously, if you concatd various commands in the same do shell script, the
first of them causing errors would cause also an applescript error, so
subsequent commands wouldn't be executed (in this sample, "ls -la").

I think it's the same in a Terminal window, so maybe AS can't do nothing at
this point (?)

I also noticed that now the default path in do shell script is the root:

----------------
do shell script "pwd"
--> "/"
----------------

Now, let's combine both new behaviours and see what happened in my comp two
days ago, when I was running some tests:

----------------
do shell script "cd /bogus/path; rm -rf"
----------------

Result: delete everything in the boot disk.

Thanks God I detected the issue and lost only some GBs of re-installable
applications ;-)


jj


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: do shell script undesired behaviour (!)
      • From: "Mark J. Reed" <email@hidden>
    • Re: do shell script undesired behaviour (!)
      • From: Axel Luttgens <email@hidden>
    • Re: do shell script undesired behaviour (!)
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Changing voice in VoiceOver
  • Next by Date: Re: do shell script undesired behaviour (!)
  • Previous by thread: Re: Changing voice in VoiceOver
  • Next by thread: Re: do shell script undesired behaviour (!)
  • Index(es):
    • Date
    • Thread