Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Bart
On 4/10/11, Marco van de Voort wrote: > In our previous episode, Luca Olivetti said: > Or change the syntax in a way that the last command is not a wildcard. > > mv/cp work that way, they assume the last argument is a destination, and all > others are generated by wildcards. I thought of that too

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Jonas Maebe
On 10 Apr 2011, at 14:15, Sven Barth wrote: > On 10.04.2011 13:45, David W Noon wrote: >> >> A program can open /proc/self/cmdline as a text file, and retrieve its >> command line to re-parse it for itself. > > Quick test: this does also contain the already extended command line. And the reaso

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Sven Barth
On 10.04.2011 13:45, David W Noon wrote: On Sun, 10 Apr 2011 11:50:56 +0200 (CEST), Michael Van Canneyt wrote about Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux: On Sun, 10 Apr 2011, Bart wrote: [snip] I would prefer to expand the wildcards by myself, but it seems

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread David W Noon
On Sun, 10 Apr 2011 11:50:56 +0200 (CEST), Michael Van Canneyt wrote about Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux: >On Sun, 10 Apr 2011, Bart wrote: [snip] >> I would prefer to expand the wildcards by myself, but it seems I have >> no access t

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Marco van de Voort
In our previous episode, Luca Olivetti said: > > Obviously this is a common scenario on Linux, so how to treat it? > > You don't, accept the fact and don't try to oppose resistance ;-) > > > > > I would prefer to expand the wildcards by myself, but it seems I have > > no access to what the user

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Michael Van Canneyt
On Sun, 10 Apr 2011, Bart wrote: Hi all, I ran into a problem with resolving commandline parameters, due to wildcard expansion by bash. [snip] Obviously this is a common scenario on Linux, so how to treat it? I would prefer to expand the wildcards by myself, but it seems I have no access

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Sven Barth
On 10.04.2011 01:34, Bart wrote: My program expects input from the commandline in the form scopy source dest when you now specify wildcards on the commandline, they will be expanded by bash, so the output will be like this: [snip] However from inside my program I cannot distinguish between

Re: [fpc-pascal] Parsing commandline parameters with wildcards on Linux

2011-04-10 Thread Luca Olivetti
Al 10/04/11 01:34, En/na Bart ha escrit: > Obviously this is a common scenario on Linux, so how to treat it? You don't, accept the fact and don't try to oppose resistance ;-) > > I would prefer to expand the wildcards by myself, but it seems I have > no access to what the user actually typed on