After investigating alternative approaches with good 'ole Google, the better approach is shown below;
$ cat /tmp/go
#!/bin/bash
for i in `seq 100`; do
N=$(printf %03d $i)
echo $N
done
Cheers.Random thoughts from the 'Fat, Slow Kid'. I am a software engineer by profession, the majority of my thoughts will concern technology and my profession.
$ cat /tmp/go
#!/bin/bash
for i in `seq 100`; do
N=$(printf %03d $i)
echo $N
done
Cheers.
#!/usr/bin/tclsh
while { [gets stdin line] >= 0 } {
puts "got '$line'"
}
$ ls | ./tclPipe
got 'Desktop'
got 'IM'
got 'ImagingManager.tar.gz'
got 'ISC'
got 'tclPipe'
#!/usr/bin/tclsh
set fp [open "|ls" r]
while { [gets $fp line] >= 0 } {
puts "got $line"
}