diff options
Diffstat (limited to 'bin/pbfields')
-rwxr-xr-x | bin/pbfields | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/pbfields b/bin/pbfields index a06bf0b..310a375 100755 --- a/bin/pbfields +++ b/bin/pbfields @@ -118,11 +118,12 @@ function quotevals () function bashquote (val) { - - if(val ~ /[$'"`]/){ + if(val ~ /'/){ gsub(/[$"`]/, "\\\\&", val) return sprintf("\"%s\"", val) + }else if(val ~ /[ <>`$"]/){ + return sprintf("'%s'", val) + }else{ + return val } - if(val ~ /[ <>]/) return sprintf("'%s'", val) - return val } |