Re: Couple Neat things

From: Eric Helvey (helver@ALLIANCES.ORG)
Date: 11/06/98


I called mine reset_indices...

#!/bin/sh

ls -1 /home/mudadmin/mud/lib/world | gawk -f reset


which calls reset:

{
        system("cd /home/mudadmin/mud/lib/world/"$1"; /bin/ls -1 *."$1" |
grep [0123456789] | sort -n > index.check; echo '$' >> index.check")
}


Basically it takes an ls of world which gives (wld, zon, shp, etc), and
pipes each one into reset...

in reset, you take an ls, grep it so you only get the files you want (no
index files, etc), then sort them numerically, since the ls output won't
be sorted.  Tack the $ onto the end, and you're done...

Helv


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST