A little script problem

Das Goravani goravanis at gmail.com
Wed Sep 29 21:02:40 UTC 2021


Doug or anyone,

Thanks Doug that might be the thing. 

I read it and I have this question:

Do you know how to output a single LF character from Omnis. I imagine if I knew the code I. Could use car() to insert it into my text file. 

I am not using TextEdit to make the file, only to look at it after it’s made. I am making the file with Omnis, using Prompt for print file and Transmit text to print file

I have tried (Add new line) and also car(13) to end the lines, both did not produce right results.

Do you know the character number for the single LF character?

Thanks,

Das Goravani



> On Sep 29, 2021, at 4:56 PM, Doug Easterbrook <doug at artsman.com> wrote:
> 
> hi Das.
> 
> I believe that unix requires   linefeed as line endings on scripts.    CR (carriage Return) wont work — and thats the default mac line ending for text and pages.
> 
> 
> I use bbedit (you can get a limited version free from barebones software) to edit unix scripts.        you just have to set the file’s line ending to Unix style line feeds.   You cannot, as far as I know, use TextEdit to make script files easily
> 
> 
> 
> to quote this web page:
> 
> https://www.editpadpro.com/tricklinebreak.html
> 
> A problem that often bites people working with different platforms, such as a PC running Windows and a web server running Linux, is the different character codes used to terminate lines in text files.
> 
> Windows, and DOS before it, uses a pair of CR and LF characters to terminate lines. UNIX (Including Linux and FreeBSD) uses an LF character only. OS X also uses a single LF character, but the classic Mac operating system used a single CR character for line breaks. In other words: a complete mess.
> 
> Problems arise when transferring text files between different operating systems and using software that is not smart enough to detect the line break style used by a file. E.g. if you open a UNIX file in Microsoft Notepad, it will display the text as if the file contained no line breaks at all. If you open a Windows file in a UNIX editor like “joe” or “vi”, you will see a control character (the CR) at the end of each line. Older versions of Perl on Linux would refuse to run any script that used Windows line breaks, aborting with an unhelpful error message.
> 
> 
> 
> Doug Easterbrook
> Arts Management Systems Ltd.
> mailto:doug at artsman.com
> http://www.artsman.com
> Phone (403) 650-1978
> 
>> On September 29, 2021, at 12:44 PM, Das Goravani <goravanis at gmail.com> wrote:
>> 
>> 
>> It’s merging commands, before the first one ends, it has started the second with no carriage return, just straight into the next command
>> 
>> I am going to post to Apples developer forum under Terminal and Script
>> 
>> There are no invisibles, no wrong quotes, the commands run fine if pasted into terminal individually
>> 
>> It’s in running the script, that terminal doesn’t see and respect the returns, and doesn’t finish one command, it starts the next
>> 
>> I wonder if it’s me, my Terminal
>> 
>> It seems to work except for this script
>> 
>> The script is good viewed in Text and Pages
>> 
>> It’s pretty simple, a simple task
>> 
>> There’s code that captures all the file paths inside Omnis
>> 
>> Then there’s code that concatenates the particulars of a code sign command with the path to make a command
>> 
>> And then it is transmitted to the print file add new line for return
>> 
>> Tried use car(13) instead of add new line, no effect
>> 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
> 
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 



More information about the omnisdev-en mailing list