FWD: creating logfile (shell command)
Tory Patnoe
tpatnoe at qwest.net
Thu Jul 14 15:55:50 UTC 2005
René L. Reingard wrote:
>
> also this question, i would like to ask again.
> thanks to the experts.
> René
>
> hello shell experts
> if this is a parameter for getting a Logfile created (software name is
> bdc), then how to put it into a working command ($ bdc --log ?????).
> i had some tries but did not got it.
>
I may be misreading the question but this sounds like simple shell
redirects. If you want to log the output of the bdc command then run:
bdc >& yourlog.log
The ">&" syntax tells the shell to redirect stdout and stderr from bdc
to yourlog.log. Use ">" for stdout only.
If you want to see the output to the terminal as well as to a log file
use tee:
bdc 2>&1 | tee yourlog.log
The "2>&1" tells the shell to redirect stderr (2) to the same streams as
stdout (1). The "|" syntax tells the shell to redirect the stdout to the
tee command.
Look for redirect in the bash man page.
If the command bdc has a --log option then just ignore.
Tory
More information about the ubuntu-users
mailing list