You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
307 B
Bash
26 lines
307 B
Bash
#!/bin/sh
|
|
#!/usr/bin/expect -f
|
|
|
|
if [ $# -lt 4 ]
|
|
then
|
|
echo "Usage : `basename $0` [PATH] [ORG_FILE] [CHG_FILE] [DEL_FILE]"
|
|
exit
|
|
fi
|
|
|
|
PATH=$1
|
|
ORG=$2
|
|
CHG=$3
|
|
DEL=$4
|
|
|
|
cd $PATH
|
|
|
|
/bin/mv -f $PATH/$ORG $PATH/$CHG
|
|
|
|
if [ "${#DEL}" -gt 0 ]
|
|
then
|
|
echo "File Delete : "$PATH/$DEL
|
|
/bin/rm -rf $PATH/$DEL
|
|
fi
|
|
|
|
exit
|