find command with while instead of for-loop

This commit is contained in:
Krishna Vedala 2020-05-29 18:47:20 -04:00
parent 9844d887b0
commit 1d24b96ad6

View File

@ -24,7 +24,7 @@ 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: |
for fname in `find . -type f -name '*.cpp' -o -name '*.h' -print0` find . -type f -name '*.cpp' -o -name '*.h' -print0 | while read -d $'\0' fname
do do
echo "${fname}" echo "${fname}"
new_fname=`echo ${fname} | tr ' ' '_'` new_fname=`echo ${fname} | tr ' ' '_'`