[lug] selinux
Lee Woodworth
blug-mail at duboulder.com
Wed Feb 21 17:47:45 MST 2018
On 02/21/2018 05:38 PM, BC wrote:
>
> I'm converting a [bash] shell script to golang in an effort to learn to program in Go.
> I'm having lots of success but this script statement has me confused:
>
>
> _value="$(__get_jail_prop $_property default)"
>
>
> The puzzling word is 'default'. __get_jail_prop is a function to which is passed the
> parameter $_property (defined elsewhere). The function returns _value.
>
> But what does the word 'default' do? I tried passing the word "default" to the
> Go-equivalent function and the program bombs. So I don't think it is a parameter to be
> passed.
I don't recall the string 'default' being special to the shell in an
argument list. It looks to me like a second argument to the command/function.
info bash usually has all the gory details
What could happen is that since _property is not quoted, when it is empty then
the command expansion is equivalent to:
"$(__get_jail_prop default)"
More information about the LUG
mailing list