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 |
How to declare functions in unix shell script?
how to read systems current date and time
What is echo in shell?
write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?
What exactly is a shell?
What is scripting used for?
What is shell and terminal?
What is bourne shell scripting?
What happens when you type ls?
What is meant by dos operating system?
Which scripting language is best for automation?
What is a shell script? Can you name some of its advantages?