Tag: Scripting
seq on osx
by Jayce on Nov.04, 2008, under Geeky
I was trying to mirror down a set of zip’s (CD3WD a pretty amazing resource) and I didnt’ want to just mirror, because of other data. So I was trying to do a simple loop, but was thinking too Perlish and trying to sprintf somehow the numerical formatting (files are cd3wd401 to 444, so needed the 0). Perlhoser corrected my attempt, by pointing me to the seq command, with the -w flag, which pads the width to the largest amount, with leading zeros, perfect.
Until I tried to run it on my mac, which had the drive I wanted it on, instead of a linux box. Seq wasn’t installed, and I couldnt’ find it with macports. However I did find via google that the ‘coreutils’ port has a ‘gseq’ tool. Drop in replacement for my script.