Simultaneous pipe to grep and redirect to stdout -
in linux bash, trying run command , grep argument:
command | grep
however, need redirect result of commad stdout , simultaneously pipe grep (i need see both grep result , command result in stdout).
i googled bit , tried variations, such as:
command | tee /dev/tty | grep
but, no luck.
i don't want use sth like
command command | grep
as ugly :)
thanks,
try
command | tee >(grep whatever)
note there's no space between these 2 symbols: >(
.
Comments
Post a Comment