From f40bcf9340f6668b2aa5d12add58ab9d6dd01ec3 Mon Sep 17 00:00:00 2001 From: gemmaro Date: Wed, 7 Aug 2024 19:28:33 +0900 Subject: [PATCH] Use the grep command with flag -E instead of the deprecated egrep. --- cmap_patch.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmap_patch.sh b/cmap_patch.sh index 641af3e..72534ba 100755 --- a/cmap_patch.sh +++ b/cmap_patch.sh @@ -18,7 +18,7 @@ function buildCmap() { awk 'NR > 1 {print}' "$CMAP_MASTER" | while read line do out_name=$(echo "$line" | awk -F, '{print $4}') - grep_out_name=$(egrep -m1 "name=\"${out_name}[#\"]" "$ttx_path" | perl -pe 's/^.+name="([^"]+?)".+/$1/') + grep_out_name=$(grep -E -m1 "name=\"${out_name}[#\"]" "$ttx_path" | perl -pe 's/^.+name="([^"]+?)".+/$1/') if [ -z "$grep_out_name" ]; then continue fi @@ -35,7 +35,7 @@ function buildCmap() { # 適用するttxファイルを作成 ( - egrep -v 'cmap_format_14| uvs=' "$ttx_path" | awk '/<\/cmap>/ {exit} {print}' + grep -E -v 'cmap_format_14| uvs=' "$ttx_path" | awk '/<\/cmap>/ {exit} {print}' cat "$TMP_TTX" awk 'BEGIN {prFlag = 0} // {prFlag = 1} prFlag == 1 {print}' "$ttx_path" ) > $GENERATED_CMAP