find command using IFS instead

This commit is contained in:
Krishna Vedala 2020-05-29 18:52:01 -04:00
parent 1d24b96ad6
commit 0e130658b5

View File

@ -24,7 +24,8 @@ jobs:
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
- name: Filename Formatter - name: Filename Formatter
run: | run: |
find . -type f -name '*.cpp' -o -name '*.h' -print0 | while read -d $'\0' fname IFS=$'\n'
for fname in `find . -type f -name '*.cpp' -o -name '*.h'`
do do
echo "${fname}" echo "${fname}"
new_fname=`echo ${fname} | tr ' ' '_'` new_fname=`echo ${fname} | tr ' ' '_'`