From 84d77b8aec6dd1bb1fa8ea5c0db398d7624118b5 Mon Sep 17 00:00:00 2001 From: William Melody Date: Sat, 12 Sep 2015 14:13:00 -0700 Subject: [PATCH] Export space and tab regular expression variables. These variables are used within regular expressions, but as the program evolves they are not always in constant use. Exporting these variables silences ShellCheck warnings and makes them available to subshells. --- hosts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts b/hosts index 00fa9d5..632e6f3 100755 --- a/hosts +++ b/hosts @@ -55,10 +55,10 @@ HOSTS_PATH="${HOSTS_PATH:-/etc/hosts}" # the environment, and POSIX [[:space:]] matches whitespace characters other # than just space and tab. These variables provide an easier, portable way to # test for just these two characters. -_TAB_=$'\t' -_SPACE_=$' ' -_TAB_SPACE_="${_TAB_}${_SPACE_}" -_TAB_SPACE_CC_="[${_TAB_SPACE_}]" +export _TAB_=$'\t' +export _SPACE_=$' ' +export _TAB_SPACE_="${_TAB_}${_SPACE_}" +export _TAB_SPACE_CC_="[${_TAB_SPACE_}]" ############################################################################### # Debug