Comment

Comment by isivaxa

  #!/bin/bash
  tty
  if [[ $? -ne 0 ]] ; then
      # command returned nonzero
      echo "not a tty"
  else
      # command returned zero
      n=$?
      ((n=$n+2))
      ((n=$n+2))
      echo "0+2+2=$n";
  fi
parent isivaxa 12 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton