c program to check whether all the directories in the path
exists has read and write permission
Answer / rakesh
#!/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 | 0 No |
Please anyone suggest atleast 2 good training institutes in Hyderabad, INDIA where i can learn unix shell scripting.
In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.
How will you copy a file from one machine to other?
Explain about login shell?
write a shell program to check wheather a given string is pallindrome or not?
How would you print just the 25th line in a file using smallest shell script?
How do I start a shell script?
What is shell company all about?
What is the syntax of "grep" command?
State the advantages of shell scripting?
What are different types of shell?
Create a bash shell script that reads in a number from the user. If the number is 1, print out the date. If the number is 2, list the files in the current directory. If the number is 3, print out who is currently logged onto the system. If the number is anything else, print out an error message and exit. Name this script "various.sh"