You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A number of times we've wanted to get output from the module command and redirect it, or pipe it into another command. It's always a bit of a hassle and can be surprisingly tricky to get right in some circumstances, because of the various things module and modulecmd do to get the output to the user.
Proposed solution
An explicit command-line option that directs to a file all output that would normally be presented to the user.
E.g.:
$ module whatis strace
---- /shared/ucl/apps/modulefiles/development ----
strace/4.12: Adds strace 4.12 to your environment. Trace system calls and signals.
$ module whatis --output-file=module.whatis.strace strace
$ cat module.whatis.strace
---- /shared/ucl/apps/modulefiles/development ----
strace/4.12: Adds strace 4.12 to your environment. Trace system calls and signals.
Does this seem feasible and sensible?
The text was updated successfully, but these errors were encountered:
I will look if I can add an option to control whether or not the output should be redirected to stdout. With that you should be assured to find the output on either stdout or stderr to then pipe or redirect the chosen channel.
Work is almost finished on this feature, so I can confirm it will be part of version v5.1.
A redirect_output configuration option is added to set by default if output should be redirected or not. Also the --redirect and --no-redirect command-line switches are added to change behavior for a specific command run.
Problem
A number of times we've wanted to get output from the module command and redirect it, or pipe it into another command. It's always a bit of a hassle and can be surprisingly tricky to get right in some circumstances, because of the various things module and modulecmd do to get the output to the user.
Proposed solution
An explicit command-line option that directs to a file all output that would normally be presented to the user.
E.g.:
Does this seem feasible and sensible?
The text was updated successfully, but these errors were encountered: