Richard Neill writes:
> What I'm suggesting is to experimentally build a version of bash which has
> mv/cp/ls/stat/grep/ all built in.
This is possible without rebuilding bash, see the documentation of the
`enable' builtin. There are already a few examples in the bash
distribution under ex
> > > Strings compared with [[ string1 < string2 ]] are supposed to use
> > > the current locale, but they don't.
> >
> > It's a documentation error (but a long-standing one). The code has
> > always used strcmp, not strcoll.
>
> how about change it to strcoll then ?
I'll consider that as a poss
Andreas Schwab wrote:
What I'm suggesting is to experimentally build a version of bash which has
mv/cp/ls/stat/grep/ all built in.
This is possible without rebuilding bash, see the documentation of the
`enable' builtin. There are already a few examples in the bash
distribution under exam
Hi,
I was wondering how to pass arguments with space inside. For example, my
bash script looks like:
#!/bin/bash
ARG_OPTS=""
while [[ -n "$1" ]];
ARG_OPTS="${ARG_OPTS} $1"
shift
done
If I pass an argument like "--options='-t 0 -v 0'", then it would be
splitted by the spaces ins
On Thursday 09 April 2009 16:46:27 lehe wrote:
> I was wondering how to pass arguments with space inside. For example, my
> bash script looks like:
>
> #!/bin/bash
> ARG_OPTS=""
> while [[ -n "$1" ]];
> ARG_OPTS="${ARG_OPTS} $1"
> shift
> done
>
> If I pass an argument like "--options
Thanks Mike.
Could you explain it a little? I don't quite get it. How to apply this to
argument parsing?
Mike Frysinger wrote:
>
> On Thursday 09 April 2009 16:46:27 lehe wrote:
>> I was wondering how to pass arguments with space inside. For example, my
>> bash script looks like:
>>
>> #!/bin/b
Actually in the bash script there is a command that passes "--options='-t 0
-v 0'" as argument to an executable. I just found if I double quote
--options='-t 0 -v 0' as argument to the bash script, then the '-t 0 -v 0'
as a whole can be preserved until reaching the command invoking the
executable
On Thursday 09 April 2009 17:47:59 lehe wrote:
> Thanks Mike.
please do not top post
> Mike Frysinger wrote:
> > On Thursday 09 April 2009 16:46:27 lehe wrote:
> >> I was wondering how to pass arguments with space inside. For example, my
> >> bash script looks like:
> >>
> >> #!/bin/bash
> >> ARG
Forgot to say in the bash script, the call to the executable is like:
my_executable ${ARG_OPTS}
lehe wrote:
>
> Actually in the bash script there is a command that passes "--options='-t
> 0 -v 0'" as argument to an executable. I just found if I double quote
> --options='-t 0 -v 0' as argument
Sorry. I won't top post again.
I tried your way but ARG_OPTS only accept the first argument and ignore the
rest.
Mike Frysinger wrote:
>
> On Thursday 09 April 2009 17:47:59 lehe wrote:
>> Thanks Mike.
>
> please do not top post
>
>> Mike Frysinger wrote:
>> > On Thursday 09 April 2009 16:46:
On Thu, 9 Apr 2009, lehe wrote:
Sorry. I won't top post again.
You just did!
I tried your way but ARG_OPTS only accept the first argument and ignore the
rest.
ARG_OPTS=( "$@" )
All the arguments are now in the array ARG_OPTS:
printf "%s\n" "${arg_op...@]}"
Mike Frysinger wrote:
11 matches
Mail list logo