Hello Ray:
The printouts are necessarily sent to stderr, because the module command
is an alias to "eval `...`". Anything sent to stdout then gets executed.
Anyways, to capture the output put the command in parenthesis
for example do the following:
csh:
(module avail)|& more
sh:
(module avail)2>&1 | more
Good Luck,
R.K.
+------------------+---------------------+
| R.K.Owen,PhD | rk...@ow... |
| KooZ Software | Environment Modules |
| NERSC/LBNL | rk...@ne... |
+------------------+---------------------+
On Wed, 18 Jun 2003, Haugli, Raymond wrote:
> Hi.
>
> I would like to redirect printouts from module-commands to use in my own
> commands or scripts. I.e. I would like a list of all loaded modules
> stored in a file or piped to a command:
> module -t list > my-modules
> module -t list |module disp
>
> But for some reason, all the output is directed to the screen no matter
> what I do. I've tried to set STDOUT/STDERR to a file, and I've tried
> 2>&1-notation but nothing works. I've even tried to use tee with no
> luck.
>
> Any good advice?
>
> br /Ray
>
> ----------------------------------------
> Raymond Haugli - Working with CM & CC
> ray...@ko... <mailto:ray...@ko...>
> work: +47 3228 7495
> mob: +47 9082 5962
>
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MAILsweeper for the presence of computer viruses.
>
> Best regards,
> Kongsberg Gruppen
> **********************************************************************
>
>
|