Re: feature request: option to start script not from the very beginning of file

2011-08-02 Thread Clark J. Wang
On Tue, Aug 2, 2011 at 10:34 PM, Steven W. Orr wrote: > On 8/2/2011 9:05 AM, Dmitry Bolshakov wrote: > >> hi >> >> perl has "-x" switch which makes it skip leading file contents until the >> #!/bin/perl >> line >> >> imho it would be good to have the same feature in bash >> >> > Huge misteak. The

Re: cond?true:false and division by 0

2011-08-02 Thread Chet Ramey
On 8/1/11 8:47 PM, Chet Ramey wrote: > On 8/1/11 4:41 AM, dnade@orange-ftgroup.com wrote: >> Hello >> >> I wanted to check a variable before attempting to divide something by it, so >> I wrote : >> >> echo $(( foo==0?0:something/foo )) >> >> And bash 2, 3 and up to 4.2.10 version sent me

Re: feature request: option to start script not from the very beginning of file

2011-08-02 Thread Steven W. Orr
On 8/2/2011 9:05 AM, Dmitry Bolshakov wrote: hi perl has "-x" switch which makes it skip leading file contents until the #!/bin/perl line imho it would be good to have the same feature in bash Huge misteak. The shebang is processed by the exec system call. As such, it must occupy the first

Process substitution file consumed?

2011-08-02 Thread Maarten Billemont
In the following snippet, I expect the two ls' to give the same output. However, it appears the process substitution's temporary file sometimes vanishes for the second. Can someone explain why and whether this is the desired behavior or not? A Linux (2.6.27.6) VM in a QEMU says this: # moo()

feature request: option to start script not from the very beginning of file

2011-08-02 Thread Dmitry Bolshakov
hi perl has "-x" switch which makes it skip leading file contents until the #!/bin/perl line imho it would be good to have the same feature in bash -- With best regards Dmitry Bolshakov