[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Stupid Shell Trick



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.