[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
safe shell strings
From: |
Richard KIrk |
Subject: |
safe shell strings |
Date: |
Thu, 6 Mar 2014 08:38:55 -0800 (PST) |
Hi.
Is there any generic function that takes a string such as a filename, and
turns it into something that can be quoted in a single command line string
for the shell that system() is going to use? I can't find one, but it took
me a long time to find strtrim() so there might be one out there. If you
know there isn't one, please let me know so I can stop looking.
I don't need help writing such a tool. Well, actually I probably do, but I
am going to strtrim() the name and stick it in double quotes. I don't know
if that works in Windows shells, but It WIll Do For Now. However, I would
much rather be using some well-debugged tool, instead of re-inventing the
wheel, as my wheels sometimes come out triangular.
Cheers.
Richard Kirk
--
View this message in context:
http://octave.1599824.n4.nabble.com/safe-shell-strings-tp4662798.html
Sent from the Octave - General mailing list archive at Nabble.com.
- safe shell strings,
Richard KIrk <=