Xref: utzoo alt.sources:153 comp.os.minix:2555 Path: utzoo!mnetor!uunet!pyrdc!pyrnj!rutgers!mtunx!mtune!mtgzz!mtgzy!mtuxo!rolls!jca From: jca@rolls.UUCP (James C. Armstrong) Newsgroups: alt.sources,comp.os.minix Subject: Re: Public Domain version of: yes(1) Message-ID: <310@rolls.UUCP> Date: 7 Apr 88 17:27:14 GMT References: <4571@chinet.UUCP> Lines: 19 Keywords: Free Software Summary: BAD BAD BAD PROGRAMMING I have watched all of these varieties of yes(1) come whizzing by, and must wonder: Are you all all that bad? If you look closely, you'll see that you are doing a comparision on each execution! Why not: if [ "$#" -gt 1 ] then ans=$* else ans=y fi while true do echo $ans done Check what you want to echo ONCE ONLY, assign it and echo it.