I want to use a globbing pattern to match only printable (including space) ASCII characters 0x20 through to 0x7e. This is being used inside a super super.tab database.
I've arrived at the pattern:
[[ -~]]
This appears to work and does indeed restrict non-printing characters from being passed as arguments.
Have I over looked anything, or is this the correct way to specify this range of characters?
Edit:
Based on mikeserv's suggestion to use [[:print:]], I tried and it doesn't seem to work.
Here's what the entry in my super.tab looks like:
dosuperthing /system/dosuperthing.pl $Users uid=0 arg1="[[:print:]]"
If I try [[:print:]], [:print:] or :print: as globbing patterns for arg1 it results in (respectively) the following being logged by super where I pass abcdef as my first argument:
super: (admin) Your argument #1 <abcdef> must match pattern <[[:print:]]>
super: (admin) Your argument #1 <abcdef> must match pattern <[:print:]>
super: (admin) Your argument #1 <abcdef> must match pattern <:print:>
This is old legacy production code and I'm not able to tinker with it beyond tuning the acceptable arg1-99 patterns inside super.tab.