🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: mod.computers.apollo
1 messages
1 total messages Started by Jim Rees Thu, 26 Jun 1986 14:56
Re: sanity check ...
#191
Author: 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

-------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads