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 in a script?
how did u debugging in unix/ linux platform ??( project Related)
How to create environment variables?What are the conditions for creating variables?
What is an inode block?
what is the difference between writing code in shell and editor?
What are the different types of variables used in shell script?
How to print the first array element?
c program to check whether all the directories in the path exists has read and write permission
How will you emulate wc –l using awk?
what is tickets $ what low,medium,high priorite pls define time also
Is powershell a language?
What does echo $0 do?