When I was still scripting in (t)csh, I wrote the following;
I assume what you want is a variant of that ( ; is my prompt)
; cat `{whatis modavail}
#!/Utils/bin/tcsh -f
source /Tios/Utils/Modules2.2b/init/tcsh
( module avail ) | & grep -v ^---- | tr ' ' '\012' | sort | uniq | grep -v '^$'
;
Axel.
> 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.
|