2015-05-18 Tom de Vries <tom@codesourcery.com>
* check_GNU_style.sh (g, ag, vg, col): Declare local vars with local.
From-SVN: r223283
+2015-05-18 Tom de Vries <tom@codesourcery.com>
+
+ * check_GNU_style.sh (g, ag, vg, col): Declare local vars with local.
+
2015-05-18 Tom de Vries <tom@codesourcery.com>
* check_GNU_style.sh: Improve readability function calls.
# Grep
g (){
- msg="$1"
- arg="$2"
+ local msg="$1"
+ local arg="$2"
cat $inp \
| egrep --color=always -- "$arg" \
> $tmp && printf "\n$msg\n"
# And Grep
ag (){
- msg="$1"
- arg1="$2"
- arg2="$3"
+ local msg="$1"
+ local arg1="$2"
+ local arg2="$3"
cat $inp \
| egrep --color=always -- "$arg1" \
| egrep --color=always -- "$arg2" \
# reVerse Grep
vg (){
- msg="$1"
- varg="$2"
- arg="$3"
+ local msg="$1"
+ local varg="$2"
+ local arg="$3"
cat $inp \
| egrep -v -- "$varg" \
| egrep --color=always -- "$arg" \
}
col (){
- msg="$1"
+ local msg="$1"
local first=true
local f
for f in $files; do