From mboxrd@z Thu Jan 1 00:00:00 1970 From: arnold@skeeve.com (arnold@skeeve.com) Date: Thu, 14 Jul 2016 20:25:27 -0600 Subject: [TUHS] Shell control through external commands In-Reply-To: References: <4fcf31ef-50af-10b5-0c34-ad647ed10a4e@aueb.gr> <20160714224939.GA35271@server.rulingia.com> Message-ID: <201607150225.u6F2PRVd026389@freefriends.org> Dave Horsfall wrote: > On Thu, 14 Jul 2016, shawn wilson wrote: > > > I've always been curious though - what was the reason behind > > implementing /bin/[ ? IDK any shell where this isn't implemented - I > > always assumed it's a POSIX compatibility stopgap older systems needed > > to stay compliant with their shipped shell. > > To implement: > > [ blah ] > > when it wasn't a built-in (there were few built-ins in those days). > > I have no idea why it's still there... A Posix requirement, along with > really unsafe functions? Consider execlp("[", "-f", "/some/file", "]", NULL); Then [ and test need to live in the filesystem. Arnold