#!/bin/sh
DEST_DIR="/contec/zhouxiyuan/backup"
function backupme()
{
# echo "BACKUP FILE: $1"
# echo "DEST DIR: $DEST_DIR"
backup_file=
# backup_file=`realpath $1 | awk -F '/' '{for(i=2;i<=NF;i++) print $i}'`
backup_file=`realpath $1 | sed 's/\//\+/g' `
backup_file=${backup_file:1}
cp $1 $DEST_DIR/$backup_file
}
backupme.sh
最新推荐文章于 2021-02-03 23:39:03 发布