Skip to content

Instantly share code, notes, and snippets.

@dhq314
Created October 12, 2015 10:00
Show Gist options
  • Save dhq314/45ee207249d185dd8c96 to your computer and use it in GitHub Desktop.
Save dhq314/45ee207249d185dd8c96 to your computer and use it in GitHub Desktop.
list all files in a folder
#!/bin/sh
FILE_PATH="YOUR_FOLDER_PATH"
function list_files() {
for file in `ls $1`
do
file_path=$1"/"$file
if test -f $file_path; then
#sed -i '1i%% coding: latin-1' $file_path
echo $file_path
elif test -d $file_path; then
set_encoding $file_path
#echo $file_path
fi
done
}
list_files $FILE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment