I\'m trying to get the contents of a directory using shell script.
My script is:
for entry in `ls $search_dir`; do echo $entry done
The accepted answer will not return files prefix with a . To do that use
for entry in "$search_dir"/* "$search_dir"/.[!.]* "$search_dir"/..?* do echo "$entry" done