cr, lf, and reading in terminals/vim
Dr. Hawkins
dochawk at gmail.com
Wed Oct 30 17:28:39 EDT 2019
I’ve tried every combination of cr, lf, and crlf, but whenever I assemble into a file, I get something that neither the OSX terminal or vim recognizes as having lf in it
I build a set of commands in mrgCmds, appending cr as I go, but I get a bunch of ^M in the otherwise uninterrupted stream with vi and less, while cat shows me the last line (presumably, as it keeps writing it over.
The code in question is
put "outFil=open(theOutPdf, 'wb')" & cr after mrgCmds
put "outFil.write(theOutPdf)" & cr after mrgCmds
put "quit" & cr after mrgCmds
replace cr with crlf in mrgCmds
open file fldr & "/theCmds.py" for write
write mrgCmds to file fldr & "/theCmds.py"
close file fldr & "/theCmds.py"
please, someone help, before the termcap flashbacks tern me into a quivering blob of fear!
—
Richard E. Hawkins, Esq.
The Hawkins Law Firm
3430 E. Flamingo Rd.
Suite 232
Las Vegas, NV 89121
(702) 508-8462
More information about the use-livecode
mailing list