Self professed idot looking for help
LOL
Hi all, I am new to Unix and I have to write a shell script that will check to see if a file exist and then create it if it does not. The file I need to search for is titled "A1. dat" and here is my feeble attempt at creating the script:
#!/bin/bash
A1=�A1.dat�
for Al in .dat
do
if [ -f $Al]
then
echo �file $Al does exist�
else
echo � file $Al does not exist�
echo �creating file $Al�
touch $Al
fi
done