[ale] Stupid Shell Trick

jeff_hubbs at mcgraw-hill.com jeff_hubbs at mcgraw-hill.com
Wed Feb 10 10:44:24 EST 1999


I need a suggestion for a "stupid shell trick" for bash.

I have a directory tree full of files.  The names of the files end with an
extension (i.e., dot followed by some characters) followed by a semicolon
and a number, like so:

     text.fdl;1
     tplbl.jet;1
     tqm.txt;1
     tqm2.txt;2
     vaxnet.exe;1
     vmodem.exe;2
     vmodem.log;1
     vt340_colors.txt;1
     vt340_logout.txt;54
     warn.com;1

[Note: these are VMS filenames, if you're wondering]

I want to go through the entire tree renaming these files so as to
eliminate the semicolon and everything after, like:

     text.fdl
     tplbl.jet
     tqm.txt
     tqm2.txt
     vaxnet.exe
     vmodem.exe
     vmodem.log
     vt340_colors.txt
     vt340_logout.txt
     warn.com


Any ideas?

Thanks,
- Jeff






More information about the Ale mailing list