looking to write a for loop to remove patches in the /var/sadm/patch directory. So far this is what i have:
#! /bin/sh
cd /var/sadm/patch
ls -l | awk '{print $9}' > patches
/usr/bin/sort -r patches > patches_r
for i in 'cat patches_r'
do
echo "going to remove patch $i"
/usr/sbin/patchrm $i
done
echo "All patches should be removed"
i receive the error when it gets to the for loop. it errors on 'cat patches_r' and claims there is no patch named cat or patches_r?
still new to shell scripting, can someone explain where this is messing up??