Sponsored Content
Top Forums Shell Programming and Scripting getting thousand of permissions Post 302152463 by invinzin21 on Wednesday 19th of December 2007 11:17:27 PM
Old 12-20-2007
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
 

4 More Discussions You Might Find Interesting

1. What is on Your Mind?

65 thousand dollar question

I was just a-wondering through some hardware and software sites, and in one of them, I was scrolling down a UNIX os page when I noticed that the prices for these OS's were climbing alarmingly high; in the 5 to 10 G's. Imagine my surprise when I saw one particular UNIX os selling for 65 freakin'... (10 Replies)
Discussion started by: mud
10 Replies

2. Shell Programming and Scripting

removing thousand of carriage returns using sed

I need to replace thousands of carriage returns/line breaks in a large xml file and with spaces. I hope to do so with a script, called, for example, "removeCRs." I would invoke this at the command line as ml5003$ sed -f /Users/ml5003/removeCRs oldFile > newFile The script, I presume, would... (4 Replies)
Discussion started by: ml5003
4 Replies

3. Linux

Try thousand times could not resolve famous ORA-12514 error

It is related to Linux, Oracle 9.2.0. I am new to Oracle. I am trying to connect to Oracle database say A, but as I am running this command dbstart the error is “ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect descriptor” I have successfully started lsnrctl. Here... (3 Replies)
Discussion started by: yajneshilu
3 Replies

4. UNIX for Dummies Questions & Answers

Concatenate several thousand files in unix

Hello, I would like to concatenate several thousand files (~40,000) into 1. I cannot do it with cat *.extension - it gives me an error that there are too many arguments. Any suggestions? Thanks, Gussi (6 Replies)
Discussion started by: Gussifinknottle
6 Replies
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe [ name ... ] DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /bin/cat'' it will create the following two files: -r-xr-xr-x 1 root bin 9644 Feb 11 11:16 /bin/cat -r-xr-xr-x 1 bin bin 24576 Nov 23 13:21 /bin/cat~ /bin/cat~ is the original file and /bin/cat is the self-uncompressing executable file. You can remove /bin/cat~ once you are sure that /bin/cat works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), gznew(1), gzmore(1), gzcmp(1), gzforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some other utilities (tail, chmod, ln, sleep). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWgzip | +--------------------+-----------------+ |Interface Stability | Committed | +--------------------+-----------------+ NOTES
Source for gzip is available on http://opensolaris.org. GZEXE(1)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy