bash programlamanin temel ornekleri
#!/bin/bash
FILES="$@"
for f in $FILES
do
# if .bak backup file exists, read next file
if [ -f ${f}.bak ]
then
echo "Skiping $f file..."
continue # read next file and skip cp command
fi
# we are hear means no backup file exists, just use cp command to copy file
/bin/cp $f $f.bak
done
Etiketler: bash
Toplam 0 Yorum:
Yorum Gönder
<< Ana Sayfa