• 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: linebreak in a shell script; was Re: What's wrong with this call to zip?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: linebreak in a shell script; was Re: What's wrong with this call to zip?


  • Subject: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • From: Dmitry Markman <email@hidden>
  • Date: Wed, 27 Feb 2008 20:54:58 -0500

AFAIK
by default do shell converts unix style eoln (0x0A) to mac style (0x0D)

linefeed constant is 10 not (13)
so I'd use something like that

set eoln to ASCII character 13

if you want you do shell to return unix style eoln (e.g. linefeed)

set altering line endings parameter to false

do shell script commandString ¬
  [ as returnValueClass ] ¬
  [ administrator privileges Boolean ] ¬
  [ password passwordString ] ¬
  [ altering line endings Boolean ]



On Feb 27, 2008, at 7:05 PM, tom wible wrote:

do shell script "cd ~/Desktop" & return &" zip -r test.rtfd.zip test.rtfd"
> which failed

return is not newline

do shell script "cd ~/Desktop
	zip -r test.rtfd.zip test.rtfd"
and it worked

i understand leopard has a newline already defined...i use this on tiger:


	property newline : "
"

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


This email sent to email@hidden

Dmitry Markman

_______________________________________________
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: linebreak in a shell script; was Re: What's wrong with this call to zip?
      • From: Christopher Nebel <email@hidden>
References: 
 >linebreak in a shell script; was Re: What's wrong with this call to zip? (From: tom wible <email@hidden>)

  • Prev by Date: Re: osascript: application isn't running. huh?
  • Next by Date: Re: osascript: application isn't running. huh?
  • Previous by thread: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • Next by thread: Re: linebreak in a shell script; was Re: What's wrong with this call to zip?
  • Index(es):
    • Date
    • Thread