> On 25 Oct 2016, at 20:45, L. A. Walsh wrote:
> Stuart Shelton wrote:
>> I have some code which evals a configuration file - but before doing so
>> attempts to validate the content. It does this by taking each potential
>> keyword from the file and then doing:
>&g
> On 25 Oct 2016, at 17:36, Eduardo Bustamante wrote:
>
> What version of bash are you using Stuart? typeset -p should work for
> local variables too in any recent bash version.
typeset omitting existing variables or failing and causing a SIGPIPE I’ve seen
with Ubuntu 14.04 LTS’ bash-4.3.11(1)
> On 25 Oct 2016, at 05:40, Martijn Dekker wrote:
>
> Op 25-10-16 om 00:42 schreef Stuart Shelton:
>> Failing this, is there any alternative to ‘typeset’ to list a
>> variable declared as local to a function but which has not yet been
>> assigned a value?
>
> T
I have some code which evals a configuration file - but before doing so
attempts to validate the content. It does this by taking each potential
keyword from the file and then doing:
if typeset -p | grep -q "^declare -. ${var}$”; then
… to determine whether the keyword in question exists as a
Configuration Information:
Machine: mips
OS: irix6.5 [6.5.30f, with MIPSpro 7.4.4m]
Compiler: /usr/nekoware/bin/gcc [GCC-3.4.6] & /bin/cc [MIPSpro
GCC Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='mips'
-DCONF_OSTYPE='irix6.5' -DCONF_MACHTYPE='mips-sgi-irix6.5'
-DCONF_VENDOR='sgi' -DLO
Configuration Information [Automatically generated, do not change]:
Machine: mips
OS: irix6.5
Compiler: cc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='mips'
-DCONF_OSTYPE='irix6.5' -DCONF_MACHTYPE='mips-sgi-irix6.5'
-DCONF_VENDOR='sgi' -DLOCALEDIR='/usr/bsd/share/locale' -DPACKAGE='b