New answers tagged


In the simple case, you can ask less not to handle SIGINT, then Control-C will kill it and the exit code will be non-zero. Do this with option -K. command && check-status | less -K && followup-command As a workaround for older versions of less, you can do something like command && bash -c 'trap "exit 1" int;check-status | less -...

Top 50 recent answers are included