Jayce

seq on osx

by 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.

:, , ,

  • Gary

    The ‘gseq’ tool in coreutils isn’t a replacement, it’s the same Gnu seq tool you were looking for. MacPorts prepends a ‘g’ on the Gnu coreutils because several of them otherwise have the same names as BSD tools already included in OS X.

  • Gary

    The ‘gseq’ tool in coreutils isn’t a replacement, it’s the same Gnu seq tool you were looking for. MacPorts prepends a ‘g’ on the Gnu coreutils because several of them otherwise have the same names as BSD tools already included in OS X.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...