Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo "What directory do you want to check for files?"
- read directory
- mkdir user_records
- if [ -r $directory]
- then
- curdir=$PWD
- cd $directory
- files=$(ls *.conf 2> /dev/null | wc-w)
- if [$files !=0]
- then
- ls*.conf
- else
- echo "no conf files found"
- fi
- files=""
- cd $curdir
- curdir=""
- else
- echo"Directory does not exist or is unreadable"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement