Subject: | |
From: | |
Reply To: | |
Date: | Thu, 7 Feb 2002 17:24:07 -0500 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
[log in to unmask] wrote:
>
> The second question would be best solved in perl, but I can take a shell
> solution. I have a somewhat variable list of files, *XYZ.txt. I do not
want
> any extension on these files (adding an extension seems easy enough). Can
> they be renamed copied to a basename with a single command? I'm looking
for
> something short of some clever scripting which would build a list of
names,
> parse each to derive the basename without the extension, and build a cp or
> mv command, although if that's what it takes, then I'm stuck with that.
You can say this in the shell:
for i in *XYZ.txt; do mv $i ${i%.*}; done
Is that short enough for ya?
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|