Results 1 to 2 of 2
Write a Bash shell script that receives only one argument via command line. (Ensure that the argument must be exactly one and it must be a directory which is owned ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-30-2010 #1
- Join Date
- Apr 2010
need help in question !!!
Write a Bash shell script that receives only one argument via command line. (Ensure that the argument must be exactly one and it must be a directory which is owned by you. If not the script exits). The script should display the number of readable, writable and executable files in that directory.
For the question written above please recommend me any solution .... i have written a code but its not giving me valid output .. u can also see my code below :
if [ $# -eq 1 -a -d "$1" ]
ls $1 > perm
for var in $( cat perm )
if [ -r "$var" ]
read=`expr $read + 1`
this is just for checking the readable ..... rest of other are like the same ....
- 04-30-2010 #2
Hi and Welcome !
We can't help you in Homework questions/assignments. Its against Forum Rules.
I would suggest you go through a few bash tutorials. Don't hesitate to start a new thread if you have any specific problem.