On Sun, 12 Oct 2008, Kelly Jones wrote:

Can I force tcsh to say "previous command returned empty stdout" or
something? I often cut and paste shell output for my cow-orkers, and
it's crucial to note when a command returns nothing.

Currently, I insert the information manually:

ls | fgrep 'phrase'
[no results]

but it'd be nice if tcsh had a setting to do this automatically?

Afaik there is no such setting. You could try something like

set output = `command`
if ( "$output" == "" ) then
  echo "previous command returned empty stdout"
else
  echo "$output"
endif

in your scripts (if you're scripting). Not perfect since newlines are removed by command substitution, but maybe a starting point ...

Best regards

Konrad Heuer
GWDG, Am Fassberg, 37077 Goettingen, Germany, [EMAIL PROTECTED]


_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to