Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » Homework HelpRSS Feeds

Write a shell script, which displays a list of all files in the current directory to which you have read, write and execute permissions

Posted By: Luigi Fischer     Category: Unix / Linux / Ubuntu     Views: 28430

Write a shell script, which displays a list of all files in the current directory to which you have read, write and execute permissions.

Code for Write a shell script, which displays a list of all files in the current directory to which you have read, write and execute permissions in Unix / Linux / Ubuntu

for File in *
    doif [ -r $File -a -w $File -a -x $File ]
            then
                    echo $File
            fi
    done

--------------------------------------------------------------------------------

output:
    $ sh30
    mydir
    temp
    tempdir
  
Share: 



Luigi Fischer
Luigi Fischer author of Write a shell script, which displays a list of all files in the current directory to which you have read, write and execute permissions is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 

Other Interesting Articles in Unix / Linux / Ubuntu:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
Neeraj Kumar from United States Comment on: Sep 29
Write a shell script that takes directory name as an argument and displays the count of empty files, ordinary files and directories.

View All Comments