I’m doing some bash shell scripting (don’t start with me about why I’m using bash instead of sh or csh or ksh – that’s for another day)in Slackware Linux, and Ubuntu Linux, so I decided to try a couple of the scripts on my OS X machine, and I’ve discovered the seq command is not included.

The “easiest” way to get a replacement command installed (gseq), is to install MacPorts:
http://guide.macports.org/

Then run this command after installing:
sudo port install coreutils
This will take some time so go watch TV for a while…..

Once that’s done you’ll have a whole bunch of utils installed under /opt/local/bin .. namely all GNU public utilities ported from some system V code I assume.

Note that if your scripts call for ’seq’ you’ll need to either:
change all of your scripts to call ‘gseq’ instead -or-
Use this command:  sudo ln -s /opt/local/bin/gseq /opt/local/bin/seq
I assume if you’ve gotten this far you know what seq is for and you don’t need me to explain the above command.

Enjoy!

PS – For the other 99% of you … feel free to go here … and for the WIMP’ish crowd, go here (no joke!).

  • Share/Bookmark