Command-line Knowledge Base
seq
seq
is a utility for generating a sequence of numbers.
One Line
END=16
for i in $(seq 1 $END); do echo $i; done
In a script
lastPage="128"
for i in $(seq 106 $lastPage)
do
sed -i "s/\(pageID = $i;\)/\1\n\$pageID__last = \"$lastPage\";/" ${i}__mine.php
sed -i "s/\(pageID = $i;\)/\1\n\$pageID__last = \"$lastPage\";/" ${i}.php
done
NULL