Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Jonathan Leffler — — source: Informix-list mailing list archive (1991-1998)
You need a command which allows you to detect blanks in arguments;
the command I use as standard is al (code follows). The following
SP demonstrates that it works -- and that you can get spaces into
the arguments of a command. You'll need to fix the path name to
the al command.
CREATE PROCEDURE test()SYSTEM '/work/johnl/bin/al ''blank separated'' >/dev/console';
SYSTEM "/work/johnl/bin/al 'blank separated' >/dev/console";
END PROCEDURE;
EXECUTE PROCEDURE test();
/* al.c -- list arguments one per line */
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
while (*++argv)
puts(*argv);
return(EXIT_SUCCESS);
}
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
>From: hrubin@nyx10.cs.du.edu (Howard Rubin)
>Date: 24 Sep 1996 14:47:11 -0600
>X-Informix-List-Id: <news.28419>
>
>I am writing a procedure that must write command line arguments
>to a C program via a 'system' call. A space in the string has the result
>of making the argv list have another member. putting single quotes around
>the string could fix this problem, however, Informix SQL doesn't support
>adding a single quote to a string as far as I can tell. Is there a way to
>get a single quote in a string ?
>tia.
>
>please reply to joc@disc.com
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.