passing arguments to system command
Fairlight
fairlite at fairlite.com
Tue Oct 3 14:17:31 PDT 2017
The only way I can remotely explain that at the moment would be if the
value is being started with a double quote, and thus terminated at the
shell interpreter level at the first such match it sees.
Have you tried changing to single quotes, just to see what happens?
You know, by the time you get done figuring out the quirks to this, you may
as well just write your argument list to a file, and have the shell script
read the file instead of argv for its data. That's the, "I really don't
care why, just -work-," approach.
m->
On Tue, Oct 03, 2017 at 04:47:16PM -0400, scooter6 at gmail.com thus spoke:
> Ok, so what I did was create two variables.....one is  aa(1,*)="\""
>     the other is ab(30,allup)=cli(2)   (which cli(2) is a
> 30,allup field from our client file)
> I then passed to msgbox    "value is"<{aa{ab{aa     which
> properly returned   "CLIENT NAME"   with the quotes...........
> However, when I pass this same to my shell script, it no longer errors,
> but it only shows the value UP UNTIL the first space it
> encounters.........so in this example, it just returns CLIENT
> I'm wanting to take the client name variable and have it included in
> the subject line of an email that I send @done in
> processing.....everything else works great except this part....
>
> On Tue, Oct 3, 2017 at 1:52 PM, Fairlight via Filepro-list
> <[1]filepro-list at lists.celestial.com> wrote:
>
> Another thing to keep in mind is which quotes you need. You only
> need
> double quotes if 1) the argument will need shell variable
> interpolation, or
> 2) the string will contain other single quotes, such as apostrophes.
> If you can get away with single quotes, it becomes simpler still,
> since you
> won't need to escape them.
> As far as not working, I'd stuff everything into a variable, then
> msgbox it
> so you can see exactly what is being passed to system().
> m->
> On Tue, Oct 03, 2017 at 01:45:02PM -0400, [2]scooter6 at gmail.com thus
> spoke:
> >Â Â Hmm..not how I would have ever thought to do that...
> currently I pass
> >Â Â ÃÂ <aa<ab<ac, etc......I would have assumed then I would
> have neededÃ
> >Â Â <"\"{ac{"\" Ã ÃÂ ?ÃÂ But that didn't work...
> >Â Â I'll give this a try....thanks Mark
> >
> >Â Â On Tue, Oct 3, 2017 at 1:06 PM, Fairlight via Filepro-list
> >Â Â <[1][3]filepro-list at lists.celestial.com> wrote:
> >
> >Â Â Â aa = "/path/to/command" < "arg1" < "\"arg2 with spaces\""
> < "arg3"
> >Â Â Â system aa
> >Â Â Â mark->
> >Â Â Â On Tue, Oct 03, 2017 at 12:56:39PM -0400, scooter6--- via
> >Â Â Â Filepro-list thus spoke:
> >
> >Â Â > I have a process that triggers an email at the end and I
> pass several
> >Â Â > variables to my shell script
> >Â Â > All of these parameters are short and containÃÂ no
> spaces....
> >Â Â >
> >Â Â > How do I character escape a string I want to send my script
> that
> >Â Â would have
> >Â Â > spaces in it?
> >Â Â > Meaning how would I send literal " (quotes) around a longer
> variable
> >Â Â that
> >Â Â > has spaces in it?
> >Â Â >
> >Â Â >
> >Â Â > thanks
> >Â Â >
> >Â Â > Scott
> >
> >Â Â Â > -------------- next part --------------
> >Â Â Â > An HTML attachment was scrubbed...
> >Â Â Â > URL: <[2][4]http://mailman.celestial.
> com/pipermail/filepro-list/
> >Â Â Â attachments/20171003/4e49eb59/attachment.html>
> >Â Â Â > _______________________________________________
> >Â Â Â > Filepro-list mailing list
> >Â Â Â > [3][5]Filepro-list at lists.celestial.com
> >Â Â Â > Subscribe/Unsubscribe/Subscription Changes
> >Â Â Â > [4][6]http://mailman.celestial.
> com/mailman/listinfo/filepro-list
> >Â Â Â >
> >Â Â Â --
> >Â Â Â Audio panton, cogito singularis.
> >Â Â Â _______________________________________________
> >Â Â Â Filepro-list mailing list
> >Â Â Â [5][7]Filepro-list at lists.celestial.com
> >Â Â Â Subscribe/Unsubscribe/Subscription Changes
> >Â Â Â [6][8]http://mailman.celestial.
> com/mailman/listinfo/filepro-list
> >
> > References
> >
> >Â Â 1. mailto:[9]filepro-list at lists.celestial.com
> >Â Â 2. [10]http://mailman.celestial.com/pipermail/filepro-list/
> attachments/20171003/4e49eb59/attachment.html
> >Â Â 3. mailto:[11]Filepro-list at lists.celestial.com
> >Â Â 4. [12]http://mailman.celestial.com/
> mailman/listinfo/filepro-list
> >Â Â 5. mailto:[13]Filepro-list at lists.celestial.com
> >Â Â 6. [14]http://mailman.celestial.com/
> mailman/listinfo/filepro-list
>
> --
> Audio panton, cogito singularis.
> _______________________________________________
> Filepro-list mailing list
> [15]Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> [16]http://mailman.celestial.com/mailman/listinfo/filepro-list
>
> References
>
> 1. mailto:filepro-list at lists.celestial.com
> 2. mailto:scooter6 at gmail.com
> 3. mailto:filepro-list at lists.celestial.com
> 4. http://mailman.celestial.com/pipermail/filepro-list/
> 5. mailto:Filepro-list at lists.celestial.com
> 6. http://mailman.celestial.com/mailman/listinfo/filepro-list
> 7. mailto:Filepro-list at lists.celestial.com
> 8. http://mailman.celestial.com/mailman/listinfo/filepro-list
> 9. mailto:filepro-list at lists.celestial.com
> 10. http://mailman.celestial.com/pipermail/filepro-list/attachments/20171003/4e49eb59/attachment.html
> 11. mailto:Filepro-list at lists.celestial.com
> 12. http://mailman.celestial.com/mailman/listinfo/filepro-list
> 13. mailto:Filepro-list at lists.celestial.com
> 14. http://mailman.celestial.com/mailman/listinfo/filepro-list
> 15. mailto:Filepro-list at lists.celestial.com
> 16. http://mailman.celestial.com/mailman/listinfo/filepro-list
--
Audio panton, cogito singularis.
More information about the Filepro-list
mailing list