write a shell script to check whether all the directories
in the path exist has read and write permission
Answer Posted / geichel
#!/bin/bash
for x in $(echo $PATH |sed "s/:/ /g")
do
echo "Directories in your PATH which you cannot write are:"
echo $(find $x -perm /666 -type d -maxdepth 0 2>/dev/null
|xargs ls -dl | grep -v $USER)
done
exit 0;
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What is mac default shell?
What can you do with powershell?
What are zombie processes?
What language is shell scripting?
Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.
What is wc in shell script?
What is .sh file in mac?
What is the difference between bash and shell?
What is the use of "$#" in shell scripting?
What is bash eval?
Why is shell scripting important?
How do I run a shell script on a mac?
Can you write a script to portray how set –x works?
What does debug script mean?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?