0

I have the following command:

cnee -replay -f $filename.xns -sk q -ns

I want to suppress all output from xnee when this runs. I tried changing it to

DUMMY=$( cnee -replay -f $filename.xns -sk q -ns )

based on the advice I found here: How to suppress all output from a command using Bash?

Problem is, I still see this output:

Workaround: Creating context on data display instead of control 
            You can ignore this message
Workaround: Creating context on data display instead of control 
            You can ignore this message
NOTIFICATION: If you have problem with Xnee and recording device events: File a bug report including this text.
NOTIFICATION: If you have problem with Xnee and recording device events: File a bug report including this text.
Workaround: Creating context on data display instead of control 
            You can ignore this message

Any ideas of ways that a command could still output to the shell in spite of executing it in $() to a variable?

Bash version: GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)

jpcrowe
  • 3
  • 3

1 Answers1

0

a common way of handling this is

$ your_command &> /dev/null

will send both stdin and stderr to black hole. You can selectively filter stdin or stderr as well.

karakfa
  • 66,216
  • 7
  • 41
  • 56