Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!trwatf!rlgvax!peter From: peter@rlgvax.UUCP (Peter Klosky) Newsgroups: net.unix,net.bugs Subject: Re: echo command always prints its arguments Message-ID: <613@rlgvax.UUCP> Date: Sun, 21-Apr-85 20:49:56 EST Article-I.D.: rlgvax.613 Posted: Sun Apr 21 20:49:56 1985 Date-Received: Wed, 24-Apr-85 03:17:38 EST References: <797@u1100a.UUCP>, <254@tellab3.UUCP>, <1581@ukma.UUCP> <498@nbs-amrf.UUCP> <103@denning.uucp> Organization: CCI Office Systems Group, Reston, VA Lines: 15 Xref: watmath net.unix:4316 net.bugs:630 trmsg(na) +++ Using echo to put data on the file system can be tricky. +++ The following script would truncate it's file regularly due to +++ the window between the shell performing +++ the i/o redirection and the echo program being invoked, given +++ a signal in the window. if test -f .jobname then lastjob=`cat .jobname` else lastjob=0 fi thisjob=`expr $lastjob + 1` echo $thisjob >.jobname