When I run on MacOS X a LC-shebang *from Mac-Terminal* that contains a CR, I get only a single line output.
Is there a way to work around livecode-server's "put"? It should output similar to
echo -e "Hello\n LC-world"
by /bin/bash.
Also LC's shell returns numToChar(13) instead of CR.
The file (see below) is UTF8 and has unix LF, as preferred.
- TextWrangler (if one runs the file over its "#!"-menu) converts the output tcorrectly o multiline UTF8.
- get shell ("./testfile.lc")
and also
get shell("livecode-community-server" && sTestInputPath)
both return a string with cr replaced by numTochar(13), needs to be converted.
Code: Select all
on mouseUp
set defaultfolder to "/Users/admin/Desktop"
put "/Users/admin/Applications/LiveCodeCommunityServer-6_7_1_rc_2-Mac/" & \
"livecode-community-server" into myCmd
-- set shellcommand to "/bin/csh" -- bash, csh, ksh, zsh
get shell("./testShell.lc")
put it && (cr is in it) into fld 1
get shell(myCmd && "./testShell.lc")
put cr&cr& it && (cr is in it) after fld 1
end mouseUp
Code: Select all
#!/Users/admin/Applications/LiveCodeCommunityServer-6_7_1_rc_2-Mac/livecode-community-server
putt
on putt
put "Hello" & cr & "LC-world"
end putt