Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

shell script(using csh)



hello 

i have been reading the book "teach yourself unix in
24hr" it real top book on my list.

i am just have a problem with my shell script.

i want to write a shell script to rename multiple
files by implementing a "ren" funtion

this is the synopsis : ren [-fi] source.... "dest_pat"

the command expects as arguments a number of source
files and a destination pattern. Each source file is
renamed so that it matches the destination parren. Two
forms of dest_pat are allowed:

*.new_ext
new_filename.*

in the first case the extension of every source file
is changed to new_ext. if a source file has no
extension, then new_ext is added to the file name.
there should be no wildcard characters in new_ext and
new_filename.

in the case the name of every source file is changed
to new_filename, and the old extension (if any) is
preserved.


please can u help me i have only gotting as far as
this



foreach test (hello.*)

mv $test importantstuff.$test:e

end

i more than this help me.
thank u..

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com



Messages sorted by: Reverse Date, Date, Thread, Author