Your ksh script is being given 5 parameters, and those parameters are the following literal strings:gen_multi_seq.ksh "FAMP.001.DAT" '"FAMP.001.DAT"' "001" '"001"' "AMP_D +FR"
Note that if you provided a command line arg like "'foo'" the shell script would get the literal paramter string 'foo'FAMP.001.DAT "FAMP.001.DAT" 001 "001" AMP_DFR
As you probably know already, there are many subtle details involved with the use of quotes in shell commands. In order to make sense of it all, it's essential to understand why the quotes are needed. You haven't given us any real clue about that. There's nothing in your sample ("working") shell command line that would appear to require any quotes at all -- unless the KSH script involves some sort of string editing (à la "sed", or something similar) where literal double-quotes are part of a replacement pattern.
If you're getting into this much confusion about quotes, maybe you should rethink/refactor your process -- perl can probably do a lot more to rationalize and simplify it (e.g. use perl to do whatever the KSH script was supposed to do, and eliminate the KSH script completely). You're likely to end up with something that will be easier to maintain.
In reply to Re: Execution KSH Script from Perl
by graff
in thread Execution KSH Script from Perl
by rheaton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |