This comes down to the lack of a 'seq' command (what?!) and the fact that BSD "wc -l" returns extra whitespace, while the GNU version doesn't. We should be using numeric comparisons instead of string comparisons, and then it's ok.
6 lines
71 B
Bash
Executable file
6 lines
71 B
Bash
Executable file
#!/bin/sh
|
|
i=0
|
|
while [ "$i" -lt "$1" ]; do
|
|
i=$(($i + 1))
|
|
echo $i
|
|
done
|