[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Stupid Shell Trick
- Subject: [ale] Stupid Shell Trick
- From: jeff_hubbs at mcgraw-hill.com (jeff_hubbs at mcgraw-hill.com)
- Date: Wed, 10 Feb 1999 11:04:52 -0500
Mic -
That worked fine, but it didn't descend into subdirectories like I wanted.
- Jeff
mic at mathcs.emory.edu (Michelangelo Grigni) on 02/10/99 11:04:30 AM
To: Jeff Hubbs/Tower
cc:
Subject: Re: [ale] Stupid Shell Trick
> I need a suggestion for a "stupid shell trick" for bash.
for f in *\;*; do mv -i "$f" "${f%;*}"; done
The "-i" will hopefully make it pause before overwriting
something. This is untested, maybe you should stick an
"echo" before the "mv" when first trying it, to make sure
it would do what you want.