I amtrying to read the lines from a file, these lines are absolute paths in the system. I want to check if these paths exists, if they doesn't I want to create that path and put a file in that location/path.
I had no trouble filtering these paths out using awk, grep, uniq etc but when it comes to write my own lite script that should process these lines I am clueless. I have been reading up awk but it seems a litle complicated, am I gooing in the right direction, what is the easiest way to solve this, what tools should I use?
Hi ,
I am trying to write a script which picks up each entry ( list of Filesystems in a file ) from a file and then checks whether that Filesystem was backed up or not ?
# Script to check for the backups of some particular Filesystems backup status
cat <one f ile >
while q=$(line)
do
echo $q > FS
mminfo -c gbo472b -t yesterday | grep $FS
if [ $? -eq 0 ]
then
echo "$FS was backed up "
else
echo "$FS was not backed up"
fi
done
but it is not working ..pls let me know the problem.
This script looks like it was written for sh/ksh/bash. If so, the syntax seems to be incorrect.
#Script to check for the backups of some particular Filesystems backup status
######## cat <one f ile > # hashed this out. you don't need this
while read line; do
mminfo -c gbo472b -t yesterday | grep $line
if [ $? -eq 0 ]; then
echo "$FS was backed up "
else
echo "$FS was not backed up"
fi
done < /path/to/file/with/filesystem_list
I have no idea what mminfo does, just fixed some syntax errors in the script.