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

help with a shell script


  • Subject: help with a shell script
  • From: Hudson Barton <email@hidden>
  • Date: Mon, 30 May 2005 00:26:33 -0400

Hello, this is probably off-topic, but I wonder if anyone can help me fix this little problem with a unix command.

I'm using the "XXD" unix tools for hexing and unhexing. The environment is a "do shell script" command. For my purposes, XXD needs to return exactly what it started with.

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.

Suggestions?


H. _______________________________________________ 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: Andrew Oliver <email@hidden>
  • Prev by Date: Re: PowerPoint
  • Next by Date: Re: help with a shell script
  • Previous by thread: Re: PowerPoint
  • Next by thread: Re: help with a shell script
  • Index(es):
    • Date
    • Thread