Overview
Comment: | Doesn't zap preexisting files |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6b678e47f4e5dd4093823f4a6235844c |
User & Date: | gawthrop@users.sourceforge.net on 1998-08-15 13:50:22 |
Other Links: | branch diff | manifest | tags |
Context
1998-08-15
| ||
13:51:56 | smx is now I-Adt NOT A check-in: 1fcedb3d34 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
13:50:22 | Doesn't zap preexisting files check-in: 6b678e47f4 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
13:49:19 | iters now passed as an argument. check-in: 049b8fa9a9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/mtt_rename from [9a31479760] to [47c1863ff1].
︙ | ︙ | |||
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.2 1998/01/06 13:57:39 peterg ## Now removes old version after copying ## # Revision 1.1 1998/01/06 13:48:23 peterg # Initial revision # ############################################################### old_name=$1 new_name=$2 extension=$3 if ls $old_name$extension > /dev/null 2>&1 then echo Renaming $old_name$extension to $new_name$extension sed "s/$old_name/$new_name/g" <$old_name$extension >$new_name$extension #rm -f $old_name$extension fi | > > > > > > > | 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | # Copyright (c) P.J.Gawthrop 1998 ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.3 1998/08/14 15:37:38 peterg ## rename now copies - no delete ## ## Revision 1.2 1998/01/06 13:57:39 peterg ## Now removes old version after copying ## # Revision 1.1 1998/01/06 13:48:23 peterg # Initial revision # ############################################################### old_name=$1 new_name=$2 extension=$3 if [ -f "$new_name$extension" ]; then echo "$new_name$extension \t already exists -- no action taken" exit fi if ls $old_name$extension > /dev/null 2>&1 then echo Renaming $old_name$extension to $new_name$extension sed "s/$old_name/$new_name/g" <$old_name$extension >$new_name$extension #rm -f $old_name$extension fi |
︙ | ︙ |