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 |
The information of the two files should be redirect to Third file in such a way that, the third file contain the information like this. 1st line in third file should be from 1st file 2nd line in Third file should be from 2nd file 3rd line in Third file should be from 1st file 4th line in Third file should be from 2nd file - - so on
How are shells born?
What is the difference between running a script as ./scriptname.sh and sh scriptname.sh
Why is it called a shell?
what is the difference between sh & bash shell?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is gui scripting?
How Connect to a Database in Shell Programming?
is this growing field and what is average package in this?
Is shell and terminal the same?
What is console line?
How to find all the files modified in less than 3 days and save the record in a text file?