Re: #!/bin/sh & execve

2003-03-03 Thread abc
> > the method used by FBSD 2.2.7 seems the most sane to me, > > where execve's argv[] is loaded by each whitespace > > seperated element after the shebang, > > then by command line options. > > > > 1. it is flexible. > > 2. it functions intuitively. > > 3. i don't think it breaks less flexible

Re: #!/bin/sh & execve

2003-02-28 Thread Giorgos Keramidas
Oh boy! Deja-vu... On 2003-02-28 18:32, [EMAIL PROTECTED] wrote: > This concerned how to load execve()'s argv[] array when parsing the > 'shebang' line of a script, ie: whether to pass everything after > '#!/interpeter' > > 1. as one string into execve()'s argv[] array, as some systems do, or >

Re: #!/bin/sh & execve

2003-02-09 Thread abc
minor correction/addition to previous post: instead of "infinitely recursive", i should've said that it would break things if "script" re-exec's the same file with a different interpreter. -- > #!/bin/sh > . script this won't work if "script" is going to do something before exec'ing

Re: #!/bin/sh & execve

2003-02-09 Thread Giorgos Keramidas
Please don't remove me from the Cc: list when you reply to posts that you want me to see. Otherwise, I might miss one of your replies and give you the false impression that I'm somehow ignoring your posts. On 2003-02-10 01:18, [EMAIL PROTECTED] wrote: > Giorgos Keramidas wrote: > > [EMAIL PROTECT

Re: #!/bin/sh & execve

2003-02-09 Thread abc
> > it seems more sane to allow arguments to a script given to an > > interpreter on the shebang line, passing everything after > > "#!/interpreter [arg]" off for "eval" or "sh -c" type parsing. > > This is something that can be bth good and bad though. As you have > pointed out, if a limited sort

Re: #!/bin/sh & execve

2003-02-09 Thread Giorgos Keramidas
On 2003-02-08 21:58, [EMAIL PROTECTED] wrote: > this does seem to be an ambiguous area. > > it seems more sane to allow arguments to a script given to an > interpreter on the shebang line, passing everything after > "#!/interpreter [arg]" off for "eval" or "sh -c" type parsing. This is something t

Re: #!/bin/sh & execve

2003-02-08 Thread abc
this does seem to be an ambiguous area. it seems more sane to allow arguments to a script given to an interpreter on the shebang line, passing everything after "#!/interpreter [arg]" off for "eval" or "sh -c" type parsing. i don't know how it breaks anything to load execve's argv[] with everythin

Re: #!/bin/sh & execve

2003-02-08 Thread Mikko Työläjärvi
On Sat, 8 Feb 2003 [EMAIL PROTECTED] wrote: > say i have 2 scripts, scriptA and scriptB. > > scriptA > --- > #!/bin/sh ./scriptB 1 2 3 > > scriptB > --- > #!/bin/sh > > echo 0:$0 > echo 1:$1 > echo 2:$2 > echo 3:$3 > > -- > > $ ./scriptA > > $0:./scriptB > $1:1 > $2:2 > $3:3 > > -- > > acc

#!/bin/sh & execve

2003-02-08 Thread abc
say i have 2 scripts, scriptA and scriptB. scriptA --- #!/bin/sh ./scriptB 1 2 3 scriptB --- #!/bin/sh echo 0:$0 echo 1:$1 echo 2:$2 echo 3:$3 -- $ ./scriptA $0:./scriptB $1:1 $2:2 $3:3 -- according to execve(2), only a single [arg] should be recognized: #! interpreter [arg]