You can usually find it on Linux. I wrote this one for Solaris because I liked it so much, however it lacks some of the seq features such as incrementing by something other than 1, etc. You could easily add that of course...
Code:
#!/bin/ksh
# Because there's no 'seq' on Solaris
awk -v START=$1 -v FINISH=$2 'BEGIN { for (i=START; i <= FINISH; i++) { print i } }'
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.