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: bash
Pazartesi, Mayıs 11, 2009
Perşembe, Mayıs 07, 2009
xargs basename
for i in $(ls cleanWords/*.txt|xargs basename); do cat cleanWords/$i >> CombinedKWs/$i; done
Çarşamba, Mayıs 06, 2009
Mac de make lazim oldu!
Install Fink :
http://finkproject.org/
then open up the Terminal and type fink -b install make. Job done.
http://finkproject.org/
then open up the Terminal and type fink -b install make. Job done.