Skip to content

Instantly share code, notes, and snippets.

@starzia
Created January 27, 2012 19:50
Show Gist options
  • Save starzia/1690584 to your computer and use it in GitHub Desktop.
Save starzia/1690584 to your computer and use it in GitHub Desktop.
A bash implementation of the GNU seq command found on most unix systems. This is useful on AIX (which seems to lack seq)
#!/bin/bash
# Implements GNU seq functionality.
# Useful on IBM AIX systems which don't have GNU coreutils.
if [ -z "$3" ]; then
# if no third arg
incr=1
j=$2
else
incr=$2
j=$3
fi
i=$1
while [[ i -le j ]]; do
echo $i
let i+=$incr
done
@ibrassfield
Copy link

Are we to add this to our existing script?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment