12-20-2007
136,
2
Join Date: Dec 2007
Last Activity: 3 January 2020, 1:33 PM EST
Location: Philippines, Cebu City
Posts: 136
Thanks Given: 20
Thanked 2 Times in 2 Posts
getting thousand of permissions
Hi, I would like to ask if someone could help me to shorten this process.
If example i will have a thousand files and i want to get there permisions. pls help.
$ sh researcher2.sh
rm /home/aris/logs/logna
rm a12
for i in `aclget /usr/bin/uname`
do
grep -e $i ownership | awk '{print $1}'
done > a12
echo /usr/bin/uname has the permission of `cat a12` > /home/aris/logs/logna
rm a12
for i in `aclget profile`
do
grep -e $i ownership | awk '{print $1}'
done >> a12
echo profile has the permission of `cat a12` >> /home/aris/logs/logna
rm12
for i in `aclget cron.sh`
do
grep -e $i ownership | awk '{print $1}'
done >> a12
echo cron.sh has the permission of `cat a12` >> /home/aris/logs/logna
clear
cp logna /home/aris/a/orig
cat /home/aris/logs/logna
this is the output :
/usr/bin/uname has the permission of 5 5 5
profile has the permission of 1
cron.sh has the permission of 1 7 7 7
------------------------------------------------------------------------i already tried this one, but it didnt work
y=`cat test`
for x in `aclget $y`
do
grep -e $x ownership | awk '{print $1}' >> file122
echo $y permisions is `cat file122` >> file1
done
cat file1
$ cat test
/usr/bin/uname
profile
cron.sh