Skip to Content
gnux

-s, --silent

Print nothing, only return an exit status.

An option of ttyx.

Usage

ttyx -s
ttyx --silent

Details

ShortLongValueDefaultMeaning
-s--silentnoneprint nothing, only return an exit status

Examples

Refuse to ask for a password in a cron job or CI run

ttyx -s || { echox 'no terminal: set DB_PASSWORD instead' >&2; exit 1; }

Show progress only when a person is watching

ttyx -s && echox 'Copying 4.2 GB, this takes a few minutes...'

Get the exit status alone, for a test in a script

ttyx -s; echox $?
Output
0

Help in the terminal

gnux help ttyx --silent

On this page