Created
October 12, 2015 10:00
-
-
Save dhq314/45ee207249d185dd8c96 to your computer and use it in GitHub Desktop.
list all files in a folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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