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 shell environment?
When we login into our account which files are executed?
What are filters explain sort with all the options available?
How to print all the arguments provided to the script?
What is Linux language details
What does debug script mean?
write a program to display all the files from the current directory which are created in particular month
wats the deinitions for shell utility and filter?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
Write a shell program to test whether a given number is even or odd?
how do you write sql queries using shell script for eg:- we have databae table like EMPNO,ENAME,SAL,DEPTNO columns in EMP table how you display EMPNO,SAL FIELDS from emp in SHELL SCRIPT please explain with an example
Why do we write bin bash in shell scripts?