Running a multiline shell command

Bob Sneidar bobs at twft.com
Tue Dec 13 12:35:56 EST 2011


Oh interesting. I've been suspecting it was the particular shell that Livecode uses by default (I learned that from prior posts). Also, does using variables like that mask the actual username and password in the shell window? the downside to my method is that it opens a new shell window and then merrily echo's everything including the user name and password, there for everyone to see. Since I am not activating Terminal, it runs in the background, but that is no guarantee that no one will see it. 

Bob


On Dec 13, 2011, at 4:00 AM, Bernard Devlin wrote:

> How about if you set the shellCommand so that instead of pointing to
> "/bin/sh" it points to "/bin/tcsh", or even have the shellCommand set to
> point to "/usr/bin/telnet" itself.
> 
> There are definitely some oddities with OS X and line endings (I seem to
> remember Mark Schonewille explaining it to me some years back (you can see
> the oddity by writing out a file in LC with "CR"s at the end of the line,
> then using "more" in the shell to list the file back (it will have ^M at
> the end of the lines if I remember correctly).
> 
> I would imagine that you need to have the same numToChar() characters at
> the end of your script as would be expected on the device into which you
> are telnetting.
> 
> You could also look at using the HEREDOC technique (the code between <<EOF
> ... EOF, in the first example listed here):
> 
> http://www.daniweb.com/software-development/shell-scripting/threads/131047
> 
> Bernard





More information about the Use-livecode mailing list