text viewer..
[currently viewing: /public/linux/usr/local/bin/ - raw]

#    parse    v0.1
#    I needed this to perform some funky operations on the slackware
#    package list, and though it's simple, quite limited, and fairly dumb,
#    parse has proven itself useful much more than once, especially for
#    creating ad-hoc uninstaller scripts from filtered finder results!
#    have fun!
#    (c) 2005 cor @ ;o) 

if [ "$1" != '' ]; then
    for lines in $(cut -d# -f1 $1)
          $2 $lines
        echo " parse: do something to each line of a text file.."
        echo " usage:  parse <file> <command(s)>"
        echo " ..will run through <file> and do <command> to each line of text in the file."
        echo " comments (lines beginning with \"#\") are ignored. note: if <command> is made"
        echo " up of multiple commands, enclose them in quotes.."
        echo "   parse pkglist \"slackpkg search\""
        echo " your results come back on standard output, do what you like with that.."
        echo "   parse pkglist \"slackpkg search\" >> output.log"
        echo " here's something you can try at home, check on your LAN.."
        echo "   parse /etc/hosts \"ping -c 1\" >> lan-ping.log" 
        exit 0

Welcome to!

Since switching hosts (I hope you are alright, Ed! Wherever you are …) quite a few things seems to be wonky.

Juggling two energetic boys (of very different ages) on Coronavirus lockdown, I'm unlikely to have them all fixed any time soon. Mail me! to prioritise!