[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: safe shell strings
From: |
Damian Harty |
Subject: |
RE: safe shell strings |
Date: |
Thu, 6 Mar 2014 17:24:54 +0000 |
> 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 have a feeling "strcat" is your friend. It stands for "concatenate strings".
And no, I have no idea exactly *how* it stands for that...
> strcat("A","B","C")
ans = ABC
Damian
CONFIDENTIAL: The information contained in this email communication is
confidential information intended only for the use of the addressee.
Unauthorized use, disclosure or copying of this communication is strictly
prohibited and may be unlawful. If you have received this communication in
error, please notify us immediately by return email and destroy all copies of
this communication, including all attachments.