You are not logged in.
I'd like to run a test, have it known but the output not to show. How do I do this?
[[ -z $(ls -1 screencast-[0-9][0-9][0-9][0-9]*) ]] && echo hi
If I send it to /dev/null it doesn't get recorded, what do I do?
Last edited by Gen2ly (2012-08-23 14:08:00)
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
Send it to a file - or a variable.
*think I must be missing something*
Oh, after reading better I think I get it, though the answer would be the same. Do you only want the return code of the command used for the test while other output is ignored? Various options depending on your need:
commmand >/dev/null
[[ $? -eq 0 ]] && conditionally-executed-command
[[ `command >/dev/null` ]] && conditionally-executed-command
command > ~/my.log
VARIABLE_LOG=$(command)
Last edited by Trilby (2012-08-23 12:46:26)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Oy, was up late , I couldn't see through the fog with my blunder. Thanks for seeing through it though, exactly what I needed.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline