Skip Navigational Links
LISTSERV email list manager
LISTSERV - COMMUNITY.EMAILOGY.COM
LISTSERV Menu
Log In
Log In
LISTSERV 17.5 Help - LSTSRV-L Archives
LISTSERV Archives
LISTSERV Archives
Search Archives
Search Archives
Register
Register
Log In
Log In

LSTSRV-L Archives

LISTSERV Site Administrators' Forum

LSTSRV-L

Menu
LISTSERV Archives LISTSERV Archives
LSTSRV-L Home LSTSRV-L Home

Log In Log In
Register Register

Subscribe or Unsubscribe Subscribe or Unsubscribe

Search Archives Search Archives
Options: Use Forum View

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:
Re: Migrating from VM to Unix - Log files "case" problem?
From:
Harold Pritchett <[log in to unmask]>
Reply To:
LISTSERV give-and-take forum <[log in to unmask]>
Date:
Tue, 6 Aug 1996 14:10:52 EDT
Content-Type:
text/plain
Parts/Attachments:
text/plain (57 lines)
On Mon, 29 Jul 1996 12:55:20 -0400 Jim Gerland said:
>On Mon, 29 Jul 1996, David Nessl wrote:
>> Take a few minutes to learn some Unix --
>
>Thanks!  I would but the sad fact is that "unix does not equal unix" :-(
>
>> after transfering all the log
>> files (say using ftp "mget *.LOG*") you can mass-rename the log files
>> using a single pipeline.  Here's one way (not necessarily the best) which
>> assumes the LOG files are in the current-directory:
>>
>>    find . -name '*.LOG*' -maxdepth 1 -print \
>>      | awk '{print $1,tolower($1)}' \
>>      | xargs -t -n2 mv
>
>I get:
>
>find: bad option -maxdepth
>find: path-list predicate-list
>
>So I removed the '-maxdepth 1' and got:
>
>mv ./NYCOMNET.LOG9501 ./NYCOMNET.LOG9501
>mv: ./NYCOMNET.LOG9501 and ./NYCOMNET.LOG9501 are identical
 
Jim, I just got back from SHARE and saw this.  Did you get an answer?
 
Try this:
 
     csh
     foreach a (*.LOG)
     echo $a
     mv $a `echo $a | tr 'A-Z' 'a-z'`
     end
     exit
 
 
This was typed in without benefit of testing, so your mileage may vary.
This is C shell specific and so begins with the command 'csh' to put
you in the C shell.  it ends with 'exit' to get you back out.  The
outer set of quotes on the mv line are grave accents (back quotes.)
 
The other option is to put it in a file like this:
 
#!/bin/csh
     foreach a (*.LOG)
     echo $a
     mv $a `echo $a | tr 'A-Z' 'a-z'`
     end
 
Save this with a name like "fixfilenames" and make it executable
"chmod u+x fixfilenames"
 
Now, just run it when you have .LOG files to rename.
 
Harold

ATOM RSS1 RSS2

COMMUNITY.EMAILOGY.COM CataList Email List Search Powered by LISTSERV