P
P
Puma Thailand2014-08-14 11:34:39
linux
Puma Thailand, 2014-08-14 11:34:39

How to suppress output of timeout -s 9 1 sleep 2 command in linux?

The standard option through stream redirection and output to devnul does not help
timeout -s 9 1 sleep 2 2>&1 >/dev/null
Killed
Still produces killed

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
s1dney, 2014-08-14
@s1dney

Anything after '1' is treated as part of a command that is executed inside timeout
Try something like:
UPD:

`timeout -s 9 10 sleep 2` >/dev/null 2>&1
#или
`timeout -s 9 10 sleep 2 >/dev/null 2>&1` >/dev/null 2>&1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question