rewrite some one-line if/then/fi using && and ||