I just now had to clean up some tables in a PostgreSQL database. The prior DBA thought that it would be good to split up tables into lx1, lx2, lx3 up to lx20. After I combined all the tables together, I needed to drop the originals. I could have written a Perl program to generate a series of drop table lx1; commands to feed into the psql command-line client, but instead I used the seq tool:
If you don’t have seq on your system, as on Mac OS X, you probably have jot, as in:
Then again, if you just have to do it in Perl:
but I like to use other tools than the Swiss Army Chainsaw sometimes.