In f27 there were a few lines before a script would execute. Now in f29 they go on and on and on. Saw a message about a setting that would control the clutter but I can't remember where.
Here is the hash--
sh -v ./goboy1.sh & $ module () { _module_raw "$@" 2>&1 } _module_raw () { unset _mlshdbg; if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then case "$-" in *v*x*) set +vx; _mlshdbg='vx' ;; *v*) set +v; _mlshdbg='v' ;; *x*) set +x; _mlshdbg='x' ;; *) _mlshdbg='' ;; esac; fi; unset _mlre _mlIFS; if [ -n "${IFS+x}" ]; then _mlIFS=$IFS; fi; IFS=' '; for _mlv in ${MODULES_RUN_QUARANTINE:-}; do if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then if [ -n "`eval 'echo ${'$_mlv'+x}'`" ]; then _mlre="${_mlre:-}${_mlv}_modquar='`eval 'echo ${'$_mlv'}'`' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; fi; done; if [ -n "${_mlre:-}" ]; then eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash '"$@"'`; else eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`; fi; _mlstatus=$?; if [ -n "${_mlIFS+x}" ]; then IFS=$_mlIFS; else unset IFS; fi; unset _mlre _mlv _mlrv _mlIFS; if [ -n "${_mlshdbg:-}" ]; then set -$_mlshdbg; fi; unset _mlshdbg; return $_mlstatus } switchml () { typeset swfound=1; if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then typeset swname='main'; if [ -e /usr/share/Modules/libexec/modulecmd.tcl ]; then typeset swfound=0; unset MODULES_USE_COMPAT_VERSION; fi; else typeset swname='compatibility'; if [ -e /usr/share/Modules/libexec/modulecmd-compat ]; then typeset swfound=0; MODULES_USE_COMPAT_VERSION=1; export MODULES_USE_COMPAT_VERSION; fi; fi; if [ $swfound -eq 0 ]; then echo "Switching to Modules $swname version"; source /usr/share/Modules/init/bash; else echo "Cannot switch to Modules $swname version, command not found"; return 1; fi } #!/bin/bash cd /home/rm3/2.54/30cm/52- mcnp6.sh 52-plx0.95 52-mas10.62a.s ./goboy1.sh: /usr/local/bin/mcnp6.sh: /bin/ksh: bad interpreter: No such file or directory mcnp6.sh 52-plx0.95a 52-plx0.95.s ./goboy1.sh: /usr/local/bin/mcnp6.sh: /bin/ksh: bad interpreter: No such file or directory mcnp6.sh 52-plx0.95b 52-plx0.95a.s ./goboy1.sh: /usr/local/bin/mcnp6.sh: /bin/ksh: bad interpreter: No such file or directory exit sh -v ./goboy1.sh & [2] 20077 [1] Exit 126 sh -v ./goboy1.sh [rm3@RobertPC ~]$ module () { _module_raw "$@" 2>&1 } _module_raw () { unset _mlshdbg; if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then case "$-" in *v*x*) set +vx; _mlshdbg='vx' ;; *v*) set +v; _mlshdbg='v' ;; *x*) set +x; _mlshdbg='x' ;; *) _mlshdbg='' ;; esac; fi; unset _mlre _mlIFS; if [ -n "${IFS+x}" ]; then _mlIFS=$IFS; fi; IFS=' '; for _mlv in ${MODULES_RUN_QUARANTINE:-}; do if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; then if [ -n "`eval 'echo ${'$_mlv'+x}'`" ]; then _mlre="${_mlre:-}${_mlv}_modquar='`eval 'echo ${'$_mlv'}'`' "; fi; _mlrv="MODULES_RUNENV_${_mlv}"; _mlre="${_mlre:-}${_mlv}='`eval 'echo ${'$_mlrv':-}'`' "; fi; done; if [ -n "${_mlre:-}" ]; then eval `eval ${_mlre}/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash '"$@"'`; else eval `/usr/bin/tclsh /usr/share/Modules/libexec/modulecmd.tcl bash "$@"`; fi; _mlstatus=$?; if [ -n "${_mlIFS+x}" ]; then IFS=$_mlIFS; else unset IFS; fi; unset _mlre _mlv _mlrv _mlIFS; if [ -n "${_mlshdbg:-}" ]; then set -$_mlshdbg; fi; unset _mlshdbg; return $_mlstatus } switchml () { typeset swfound=1; if [ "${MODULES_USE_COMPAT_VERSION:-0}" = '1' ]; then typeset swname='main'; if [ -e /usr/share/Modules/libexec/modulecmd.tcl ]; then typeset swfound=0; unset MODULES_USE_COMPAT_VERSION; fi; else typeset swname='compatibility'; if [ -e /usr/share/Modules/libexec/modulecmd-compat ]; then typeset swfound=0; MODULES_USE_COMPAT_VERSION=1; export MODULES_USE_COMPAT_VERSION; fi; fi; if [ $swfound -eq 0 ]; then echo "Switching to Modules $swname version"; source /usr/share/Modules/init/bash; else echo "Cannot switch to Modules $swname version, command not found"; return 1; fi } #!/bin/bash
Finally my code can run. What gives?
Robert
On Sat, 15 Dec 2018 11:30:33 -0500 Robert McBroom via users users@lists.fedoraproject.org wrote:
In f27 there were a few lines before a script would execute. Now in f29 they go on and on and on. Saw a message about a setting that would control the clutter but I can't remember where.
Here is the hash--
sh -v ./goboy1.sh & $ module () { _module_raw "$@" 2>&1 }
[snip]
#!/bin/bash
Finally my code can run. What gives?
This is just a guess, but it looks like it is checking whether the command is a module or rpm, since modules and rpms now co-exist on the system, and each have their own repositories.
I am unaware of a command to control this, perhaps someone else can provide that.
Robert McBroom via users wrote:
In f27 there were a few lines before a script would execute. Now in f29 they go on and on and on. Saw a message about a setting that would control the clutter but I can't remember where.
Here is the hash--
sh -v ./goboy1.sh & $ module () { _module_raw "$@" 2>&1 }
...
#!/bin/bash
Finally my code can run. What gives?
This comes from having the environment-modules package installed. It's pulled in by scl-utils, which is part of the default workstation install.
There was a thread about this a few months ago:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org/...
As a result of that thread I filed a bug against environment-modules regarding the verbose output:
https://bugzilla.redhat.com/1578587
Generally, unless you have a need for environment-modules (and if you aren't sure, then you almost certainly don't), it's easiest to simply remove that package. I'm more inclined to do so now after seeing that it's maintainers don't seem to be addressing the package bugs.
It might be worth adding to the bug report that using 'sh -v' causes the extra debug output regardless of whether MODULES_SILENT_SHELL_DEBUG=1 has been set. I thought that when I filed it only 'bash -x' caused it. I don't know if the problem has expanded or if I didn't catch that while testing.