#!/bin/bash echo press q to quit read answer if test $answer = q then exit 1 else echo you didnt press q fi