This piece of code sets files equal to 3 different files, then goes through a for / next loop to determine if they exist


#!/bin/ksh
files="/etc/passwd /etc/group /etc/hosts"
for f in $files; do
   if [ ! -f $f ]
      then
         echo "$f file missing!"
   fi
done
#!/bin/ksh
for car in $(cat car.txt)
do
   print "Current Car : $car"
done

#!/bin/ksh
for f in $(ls /tmp/*)
do
   print "Full file path  in /tmp dir : $f"
done

Ready for Action?

LET'S GO!
Copyright 2024 IT Remote dot com
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram