• 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: help with a shell script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with a shell script


  • Subject: Re: help with a shell script
  • From: Andrew Oliver <email@hidden>
  • Date: Sun, 29 May 2005 23:23:05 -0700

On 5/29/05 9:26 PM, "Hudson Barton" <email@hidden> wrote:

> Specifically, the problem is that my input string for XXD almost
> always contains ASCII character 10 (a line feed) in one or more
> places, and XXD often (or always - ????) returns ASCII character 13
> instead (a carriage return) when unhexing.
>
> The relevant lines of my code are:
> Hexing:      do shell script "xxd  -p -u  -c 20  " & fin
> Unhexing:      do shell script "xxd -r  -p -u -c 20 " & fin
>
> To recap, the original text (in file "fin") contains one or more
> incidents of ascii character 10, and the result contains ascii
> character 13 instead of ascii character 10.

Try using 'do shell script's optional 'altering line endings' parameter:

 do shell script "blah" without altering line endings

Andrew
:)

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: help with a shell script
      • From: Hudson Barton <email@hidden>
References: 
 >help with a shell script (From: Hudson Barton <email@hidden>)

  • Prev by Date: help with a shell script
  • Next by Date: PowerPoint
  • Previous by thread: help with a shell script
  • Next by thread: Re: help with a shell script
  • Index(es):
    • Date
    • Thread