HP3000-L Archives

February 2002, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ken Hirsch <[log in to unmask]>
Reply To:
Ken Hirsch <[log in to unmask]>
Date:
Thu, 7 Feb 2002 17:24:07 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
[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 *

ATOM RSS1 RSS2