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 |
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What is the first line in every perl script called?
What is bash coding?
What is gui scripting?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
There are three departments A,B and C.Write a query to display the names of all the persons( in departments other than A) who are paid higher than the person receiving the lowest salary in DEPT A
How will you connect to a database server from linux?
What is difference between bash and shell?
What is the use of .sh file?
What is a shell script? Can you name some of its advantages?
how to find weblogic version through linux cammand
What does it mean to debug a script?