• 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: do shell script bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: do shell script bug


  • Subject: Re: do shell script bug
  • From: email@hidden
  • Date: Mon, 12 Aug 2002 10:06:45 -0700

Sounds like you know about this.

But my problem is actually slightly different. I'm running a
do shell script "'shell script that returns Unicode'"

And it's been changed to
do shell script "'shell script that returns Unicode' > /path/to/file"

and then I do
do shell script "perl -e 'open F, qq(/path/to/file); print <F>'"

and the perl line gives me the error I'm trying to avoid!

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Seth A. Roby
Scriptwriter Intern
"Life is like an exploded clown. It's really funny until you figure out
what just happened."



John Delacour
<email@hidden> To: email@hidden
Sent by: cc:
applescript-users-admin@list Subject: Re: do shell script bug
s.apple.com


08/10/2002 01:16 AM






At 4:11 pm -0700 9/8/02, email@hidden wrote:
>open text edit. hold down control and option and hit a few keys. Some
>random characters and a lot of random whitespace will appear. Save the
file
>as Unicode 16.
>
>Run this script:
> do shell script "cat /path/to/file"
>
>You get the error:
> Can't make some data into the expected type.


Unicode tends not to include random characters!


In TextEdit, save a text (not rtf) file named "abg.txt" in you
Documents folder.

Switch to Unicode input and type with the OPTION key down

03b103b203b3

Save the file as Unicode -- it contains the three characters
lower-case "alphabetagamma"

now run

do shell script "cd; cd Doc*; perl -e'
open F, qq(abg.txt) ; print <F>'"

and you will get the contents of the file including the #254#255 at
the beginning.

"~123"

JD
_______________________________________________
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.
_______________________________________________
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: do shell script bug
      • From: John Delacour <email@hidden>
  • Prev by Date: Re: stripping resource forks from a file.
  • Next by Date: Re: Open For Access Broken in 9? [SOLVED!]
  • Previous by thread: Re: do shell script bug
  • Next by thread: Re: do shell script bug
  • Index(es):
    • Date
    • Thread