I am executing a command in terminal which is
cvlc song.amr
Problem is though the song is being played, I am getting some message after I am executing the instruction. The message is
VLC media player 1.1.9 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
[0x85de7cc] dummy interface: using the dummy interface module...
Can anyone tell me how to stop this message from coming.
Like in gcc, when we don't want warning message to come, we instruct it by giving an option as
cc -w program.c
Is there anyway, by which I can stop that message from coming. Or is it that solving that problem is the only way to stop it from coming. How to solve it then. Or else can I save those messages in some other file and stop it from coming in terminal, like how we do with this '>' redirection operator in terminal for storing the output somewhere else.
Please help me.
Thanks in advance.
does this work? cvlc song.amr &> /dev/null? otherwise command line options like what you suggest are program specific and i dunno abt cvlc's options, maybe u can try cvlc -h and see if it has a silent mode
Related
My script get stuck in some point and it doesn't show any error. I would like to know why and where it gets stuck. Is there a possibility to run a script and show me more information what is it running?
I have found -x command to run it in debug mode but I have a lot of scripts which are connected and it doesn't work for me.
With -vvv I have also tried, but somehow it doesn't show more than without it.
Does anyone know another command for that?
Read:
https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html
... and this:
https://unix.stackexchange.com/questions/155551/how-to-debug-a-bash-script
... and if that's not enough, look at the gdb-like bash debugger:
http://bashdb.sourceforge.net/
and many moore...
So I was trying to download somevideos using rtmpdump, and I used this shell script which is supposed to download the some videos but it gave me and error message saying
./script: line 9: $1: ambiguous redirect
Now I am pretty sure that I am doing something silly so I will tell you exactly what I did. I first downloaded that above file into my system saved it as "script". And opened terminal and typed:
./script
and it gave me the above error.
Now I have also gone through this thread, and also some other threads but they don't seem help me at all and now I have nowhere to go. please save me.
script tries to use $1 as the name of a file for redirection (e.g., someCommand > "$1"), but you didn't supply a an argument when you called script.
The script needs a file as the first parameter which will have one video to download per line
I want to log every error on building code.
so I can use -k to make it keep-going even error happened.
However, could I know some error has happened,
and it is -k to make it continue?
I know I can check some pattern error message like make: ***.
But I still wondering if I can have some message in log like:
"error happened, keep-going to make" when I have -k.
Thanks.
make reports errors on its output/error for human readers. Other computer programs can check its exit status, which should be non-zero if any error has occurred. If you're calling make from a shell script, you could do something similar to
make -k || echo "BAD: ERROR(S)"
except change echo to something that's actually useful for you. Other ways to call make will have similar options.
I am compiling a kernel module and it has many compilation errors in it. After running "make", the errors thrown out are too many to fit in the screen. Scrolling up doesn't reach the first error. I tried capturing the errors by doing make &2 > log which didn't work (log file was empty and the error messages were still dumped on screen).
Can someone please tell me how to go about logging all the messages generated during compilation/make into a logfile?
If you want to watch it scroll past, too:
make 2>&1 | tee log
(/bin/sh, bash and related) This sends the standard error to the same place as the standard output, then pipes them through tee to capture the result and still get screen action.
Try doing:
make >&log
the & after the > tells the shell to dump both stdout and stderr to the log. This can also be used with pipes.
I think stdout, so you can easily grep, what do you think?
Only errors go to stderr. This is in no way an error, it does exactly what the user had in mind, which is print usage information.
Always stdout, makes it easier to pipe to less, grep it etc.
If you are showing the help text because there was a problem with parsing the command line arguments, then you might use stderr.
Well, it's an explicit request for help so it's output. If for some reason you can't output the help or the user mis-spells "help" then, by all means, send that to error :-)
Users that know what they're doing can use the infamous "2>&1" if they want errors on standard output.
It's not an error, so I'd say stdout....
netcat is the only application I can think of that would redirect -h to stderr, and I can't for the life of me fathom why.
I suppose if you're outputting the help information because someone used improper arguments, you might want to redirect it to stderr, but personally even then I wouldn't use stderr because I don't think spamming error logs with fullblown help text is useful - I'd rather just output a single error pointing out the arguments were malformed to stderr. If someone is explicitly calling your application using -h or --help, then you really shouldn't redirect it to stderr.