Re: implementing flow control in bash

2008-10-21 Thread Bernd Eggink
Tony Zanella schrieb: Hello all, I'm sure this isn't a bug, but just my inability to wrap my head around enough of bash flow control: I wrote the following shell script to find all gifs in a directory. Then use "identify" from imagemagick to grab the gif width. Then, print the image name and widt

implementing flow control in bash

2008-10-21 Thread Tony Zanella
Hello all, I'm sure this isn't a bug, but just my inability to wrap my head around enough of bash flow control: I wrote the following shell script to find all gifs in a directory. Then use "identify" from imagemagick to grab the gif width. Then, print the image name and width to a file. for i in

Re: Interrupted system call when piping to grep

2008-10-21 Thread Chet Ramey
Tanel Rebane wrote: > Hello, > > a problem occurs when running the following bash shell script: > #!/usr/bin/env bash > for (( q = 0 ; q < 1 ; q++ )); do > while read -d '' z; do result+=("$z"); done < <(printf > "%s\000\n" hej | grep -a 'hej') > done > > For some reason the

Re: [Fwd: [PATCH] arithmetic -> logical shift]

2008-10-21 Thread Pádraig Brady
Chet Ramey wrote: > Pádraig Brady wrote: >> Original Message >> Date: Tue, 07 Oct 2008 11:55:51 +0100 >> From: Pádraig Brady <[EMAIL PROTECTED]> >> To: Chet Ramey <[EMAIL PROTECTED]> >> CC: [EMAIL PROTECTED] >> >> I was just discussing bit shifting with Tim Hockin using shell >> a