Hello everybody,
I'm looking for a way to redirect output to a file OR stdout using a
variable. Imagine something like the following command :
tar -xf some-software.tar >> ${LOGFILE_NAME}
There are 3 possible values for LOGFILE_NAME :
1. a filename : for logging to a file
2. the null-device : for ignoring all output
3. standard output : for 'normal' display
Option 1 and 2 are respectively a filename and /dev/null - both are true
for all Unix flavors. What can I use for the 3rd option ?
I'm usually on a Digital Unix system, where theoretically /dev/fd/1
should work but this device doesn't exist by default (see "man fd"). Nor
can I use redirection ( > ) character in a variable.
Anybody any great ideas ? Thank very much in advance.
Cheers,
Real
--
[ Please, also sent your reply directly by email, otherwise I might ]
[ miss your reply. Thanks. ]