Hi
I am trying to use shell script to display file permissions, and I can do it fine for the current user logged in, but now I want to view all file permissions for the Owner of the file, Group users and everyone, so it will look something like this:
-----------------READ WRITE EXECUTE
OWNER Username ---YES---YES---NO
GROUP USERS ---YES---NO---NO
EVERYBODY ---NO----NO---NO
how would i search the strings like rwxr-wr--, or put it in a variable. if i can achieve this i can just search the string for certain characters and print out statment based on those characters.
I started working here last week, and it�s a trainee position, where I am expected to under take a course which is involves doing these tedious tasks as part of the job, my boss is kinda my teacher, I should have said mentor though its still the same thing.
And doesn�t want me using awk or sed as they �promote laziness from programmer prospective� -_-
is it possible to redirect the string of permissions like rwxr-wr-- to a variable/tmp?
If you are not allowed to use the correct tools for the job then I suggest you kick up a fuss.
Unix utilities are there to be used not ignored because of someone's prejudices.
You have my sincere sympathies
i assume he is doing this, because he wants me to grasp some concepts, he did say i can use sed and awk once am confirtable doing stuff without them :rolleyes:
i have only being using unix for about 2 weeks now after all.
can we get to the problem in hand please
and can the find function be used to display something like the 1st string of 10 characters from a line?