From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17271 invoked from network); 22 Mar 2000 11:16:25 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Mar 2000 11:16:25 -0000 Received: (qmail 10045 invoked by alias); 22 Mar 2000 11:16:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10194 Received: (qmail 10034 invoked from network); 22 Mar 2000 11:16:09 -0000 Message-ID: <20000322111555.24182.rocketmail@web222.mail.yahoo.com> Date: Wed, 22 Mar 2000 03:15:55 -0800 (PST) From: ayo jegede Subject: shell script(using csh) To: Zsh-workers@sunsite.auc.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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