write a shell script to check whether all the directories
in the path exist has read and write permission
Answer / 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 |
What is the difference between break and continue commands?
What is eval in shell script?
Where cron file kept?
What is shell company all about?
What is the syntax of "nested if statement" in shell scripting?
What is the first line of a shell script called?
How can you find out how long the system has been running?
How do scripts work?
What is the way to do multilevel if-else's in shell scripting?
write a shell program to check wheather a given string is pallindrome or not?
What is path in shell script?
Write a shell script to get current date, time, user name and current working directory.