🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: mod.computers.apollo
Article #191

Re: sanity check ...

#191
From: Jim Rees
Date: Thu, 26 Jun 1986 14:56
23 lines
1283 bytes
	% /tmp/test.sh /etc/passwd
	Great.  can open /etc/passwd
	% /tmp/test.sh /dev/null
	Hmmmmm. can't open /dev/null

This is apparently correct behavior for sysV, and the code somehow crept
over the wall and infected the bsd4.2 '[' (which is builtin to /bin/sh;
a vestigial remnant of less prosperous days).

The (non-builtin) 'test' command seems to work correctly.  Maybe the
easiest fix is to have 'install' use 'test' instead of '['.  In fact,
this even works, provided you have a /bin/[ (linked to 'test'):

	#!/bin/sh
	if /bin/[ '!' -f $1 ]
	then	echo "Hmmmmm. can't open $1"
	else
		echo "Great.  can open $1"
	fi
	exit 0

-------
Technical Details
Message-ID: <8606270332.AA29569@uw-beaver.arpa>
Path: arc1-ca.pugleaf.net!utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!apollo.UUCP!rees

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU
Path: arc1-ca.pugleaf.net!utzoo!decvax!ittatc!dcdwest!sdcsvax!ucbvax!apollo.UUCP!rees
From: rees@apollo.UUCP (Jim Rees)
Newsgroups: mod.computers.apollo
Subject: Re: sanity check ...
Message-ID: <8606270332.AA29569@uw-beaver.arpa>
Date: Thu, 26-Jun-86 10:56:07 EDT
Article-I.D.: uw-beave.8606270332.AA29569
Posted: Thu Jun 26 10:56:07 1986
Date-Received: Sat, 28-Jun-86 00:30:45 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 23
Approved: apollo@yale-comix.arpa