/bin/sh feature?

Dave Horsfall dave at csu60.OZ
Tue Jul 10 02:44:19 AEST 1984


    Relay-Version: version B UNSW 1.0 3/14/84; site csu60.OZ
    Posting-Version: version B 2.10.1 6/24/83; site uvm-cs.UUCP
    From: hartley at uvm-cs.UUCP (Stephen J. Hartley)
    Date: Fri, 13-Jul-84 07:19:32 AEST
    Newsgroups: net.unix-wizards
    Subject: /bin/sh feature?
    Message-ID: <274 at uvm-cs.UUCP>
    Path: csu60!elecvax!basser!munnari!mulga!decvax!dartvax!uvm-gen!uvm-cs!hartley
    Date-Received: Mon, 9 Jul 84 01:22:58 AEST
    Organization: University of Vermont
    Lines: 14
    
    Here is a "feature" of /bin/sh that tripped me up for a while.  A beer to
    the first wizard to figure this one out (you have to come to Burlington, VT
    to collect, though).  The following shell script does nothing, prints no
    messages, and changes no files:
    
    	: Daily uucp script
    	: assumes you have subdirectories.
    	: modified to save another day's LOGFILE
    	SPOOL=/usr/spool/uucp
    	mv $SPOOL/LOGFILE.old $SPOOL/LOGFILE.older
    	mv $SPOOL/LOGFILE $SPOOL/LOGFILE.old
    -- 
    "If that's true, then I'm the Pope!"		Stephen J. Hartley
    USENET:	decvax!dartvax!uvm-gen!uvm-cs!hartley	The University of Vermont

The single string quote?



More information about the Comp.unix.wizards mailing list