Hi,
Is it possible to create/write to a file in UNIX format rather than Macintosh format?
Many Thanks
Chris
Hi,
Is it possible to create/write to a file in UNIX format rather than Macintosh format?
Many Thanks
Chris
You can create and write any text to a file. What do you need exactly?
I need the created file to be opened by a UNIX application that does not like Mac file format (I assume its the wrong line endings?).
What I want to do is open a file
Do some text manipulation/parsing
Create a file on the desktop
Save the results to this file
Then I can use the UNIX application to read the files.
At the moment I open the file in BBEdit and save as a UNIX file, but I’d prefer to just save it in the correct format to start with.
Many Thanks
Chris
If your problem is only line-endings, then you can do the following:
set theText to "asdf
fdsa"
--> manipulate, manipulate, manipulate
--> then, before saving to a text file
set theText to theText's paragraphs
set applescript's text item delimiters to (ASCII character 10) --> LF
set theText to theText as text
set applescript's text item delimiters to {""}
--> and now, save to file
That should do nicely,
Many thanks,
Chris