I usually set PATH at the top of the script, then forget about it.
This, and a while loop, increases readability IMHO.
Also, you can handle the egrep -v within the awk (that uses ERE like egrep).
awk has the further advantage that you can limit the search to a certain field, e.g.
This is an excellent video comment on modern society and the remix is good too:
https://www.youtube.com/watch?v=5DU1B_XkyIk
5DU1B_XkyIk
Watch the video above and post your comments. (3 Replies)
I am trying to get a listing of ALL directories only under /export (as an example). I can get all the dirs directly under /export but I need any sub dirs under those dirs. I've looked (here and google) but can not find anything that works (4 Replies)
Hi,
after a server (solaris 10) got rebooted, Im faced with the problem that in one of my zones (whole zone) /dev/null is only writeable for root
crw-r--r-- 1 root sys 13, 2 Jul 8 10:16 /dev/null
Unfortunatly chmod didnt help at this point and since its a productive system I dont... (11 Replies)
Being a system administrator i came across a statement as " Excluding temporary directories /tmp and /var/tmp, no root owned files should be in world writable directories"
While the above statement may look straight forward but how would i check if there are any such directories in the... (7 Replies)
1. The problem statement, all variables and given/known data:
Need to verify that all user home directories are writable only by their owner on Solaris. The script posted below is workable but it is taking a long time to display the results, and I don't seem to be able to fix it or find any... (6 Replies)
Hi, I'm currently working on my school assignment on how to verify that all user home directories are writable only by their owner on Solaris with VMware. But I'm not sure why my codes take a very long time to display the results. My friend says it's the `su - $i -c "ls -ld" 2> /dev/null | grep... (1 Reply)
Greetings
I am trying to create a solution that will log information into a file. That is the easy part.
What I am trying to do is have a front end script that ill ask a user what their reasoning is for logging in and log that reason into a file. The hard part I am finding is that I need that... (10 Replies)
Hi Group,
Could someone tell me how to find world writable files on my server? I can use find command in conjuction with -perm option and I will get an output. But what I need is an output which looks similar to ls -l output. Meaning, it should give me the full path of the file along with the... (1 Reply)