Skip to content

Commit

Permalink
Update fix-reverse-dollar-signs.sh
Browse files Browse the repository at this point in the history
I Used find -print0 and xargs -0 instead of find -print and xargs -L 1 allows for handling filenames with spaces or special characters more safely & I also removed the -L 1 option from the xargs command, as this is not necessary when using -print0 and -0 together.
  • Loading branch information
aria1991 authored Jan 21, 2023
1 parent ddeae94 commit 41aa068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/fix-reverse-dollar-signs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ if [[ `uname -s` != "Darwin" ]]; then
exit 1
fi

find Wikipedia/Localizations -iname '*.strings' -print | xargs -L 1 sed -E -i '' 's:\%([1-9]+)\$:$\1:g;s:([1-9]+)\$:$\1:g;s:\%([1-9]+):$\1:g'
find Wikipedia/Localizations -iname '*.strings' -print0 | xargs -0 sed -E -i '' 's:\%([1-9]+)\$:$\1:g;s:([1-9]+)\$:$\1:g;s:\%([1-9]+):$\1:g'

0 comments on commit 41aa068

Please sign in to comment.