Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a shell script to check whether all the directories
in the path exist has read and write permission



write a shell script to check whether all the directories in the path exist has read and write per..

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

Post New Answer

More Shell Script Interview Questions

How to declare functions in unix shell script?

4 Answers  


how to read systems current date and time

4 Answers  


What is echo in shell?

0 Answers  


write a shell script that counts a number of unique word contained in the file and print them in alphabetical order line by line?

6 Answers   IBM, Wipro,


What exactly is a shell?

0 Answers  


What is scripting used for?

0 Answers  


What is shell and terminal?

0 Answers  


What is bourne shell scripting?

0 Answers  


What happens when you type ls?

0 Answers  


What is meant by dos operating system?

0 Answers  


Which scripting language is best for automation?

0 Answers  


What is a shell script? Can you name some of its advantages?

0 Answers  


Categories