Seq Segment Fault.

2009-09-18 Thread Ryan Whited
Here is my code. #!/bin/bash echo Add directions here. read URL read NUM1 read NUM2 read EXT echo Please choose a folder name. read NAM mkdir $HOME/$NAM cd $HOME/$NAM for i in $(seq -w $NUM1 $NUM2); do wget $URL${i}$EXT; done I was testing out my script, and I came across an instance

Re: Seq Segment Fault.

2009-09-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Ryan Whited on 9/18/2009 4:38 AM: #!/bin/bash for i in $(seq -w $NUM1 $NUM2) Are you sure your segfault is in seq, or is it in bash? You neglected to mention which versions you were using: bash --version seq --version However, it

Re: Seq Segment Fault.

2009-09-18 Thread Philip Rowlands
On Fri, 18 Sep 2009, Eric Blake wrote: However, it seems to me that your problem is that bash tries to slurp all of $() into memory, and seq generated so much data that bash ran out of memory (or overflowed its stack). It's certainly possible for bash to run out of stack and crash with