Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!bywater!scifi!hybrid!torag!utdoe!david From: david@doe.utoronto.ca (David Megginson) Newsgroups: comp.os.minix Subject: test/[ solved; new question: executable scripts? Summary: ln /usr/bin/test /usr/bin/[ Message-ID: <1991Apr29.110459.25477@doe.utoronto.ca> Date: 29 Apr 91 11:04:59 GMT Sender: david@doe.utoronto.ca (David Megginson) Organization: Dictionary of Old English Project - U of Toronto Lines: 31 Thank you to every one who sent me mail. The solution to using the if [ ] syntax in sh is to link test to [. test is even smart enough that it looks for the ] if it is called as [. I am also interested in executable scripts. Right now, when I make a script executable, the kernel always seems to presume that it is for sh. I would like to have executable scripts like #! /usr/gnu/bin/gawk BEGIN { print "hello" } /bug/ { print "Oh no!" } END { print "bye" } If this script were called "buggy", and I chmod'd it to make it executable, I would expect it to run under gawk, but the kernel still gives it to sh (can't find BEGIN...). Any advice, or is this another incredible dumb question? -- //////////////////////////////////////////////////////////////////////// / David Megginson david@doe.utoronto.ca / / Centre for Medieval Studies meggin@vm.epas.utoronto.ca / ////////////////////////////////////////////////////////////////////////