[lug] Bash shell script question
BC
bcarr at purgatoire.org
Wed Feb 21 17:56:09 MST 2018
On 2/21/2018 5:47 PM, Lee Woodworth wrote:
> On 02/21/2018 05:38 PM, BC wrote:
>>
>>
>> _value="$(__get_jail_prop $_property default)"
>>
>>
>
> 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
Yeah, yeah - I've studied the bash man page (and what Google offers
me) for months now. I'm having to learn sh scripting alongside
golang. Bletch.
>
> 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)"
This I will have to chew on and study with the resources until I
understand what you are saying... From what I can tell of the script,
$_property is never empty at this point. I've been stepping through
my Go version of the program and it this call that causes failure.
Thanks. Oh, in case you couldn't tell, I'm a hobbyist.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180221/054df4f1/attachment.html>
More information about the LUG
mailing list