Kırmızı Şapka

RedHat, Uygulama Kurulumu, Ayarlar vs.

Salı, Mayıs 19, 2009

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:

Toplam 0 Yorum:

Yorum Gönder

<< Ana Sayfa