Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #173408

Re: My bash script is missing something - what?

From gricketson <gricketson@elchanate.org>
Newsgroups linux.debian.user
Subject Re: My bash script is missing something - what?
Date 2016-10-10 19:40 +0200
Message-ID <sqMIp-441-25@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


On 2016-10-10 10:57, Greg Wooledge wrote:
> On Mon, Oct 10, 2016 at 11:51:37AM -0400, songbird wrote:
>> Richard Owlett wrote:
>> > I have a trivial bash script named test.sh which has been marked
>> > as executable.
> 
>>   also remember that test itself is a builtin
>> or binary on some systems.
> 
> It's required by POSIX, so it will be a command on *every* system.
> Whether it's a shell builtin is not specified, but every modern shell
> makes it a builtin -- even dash.
> 
>>   you may be running on thing and thinking
>> you are running another.
>>
>>   in this particular case with the .sh
>> extension you are safe, but forget that
>> once and ...
> 
> Yes, this is excellent advice.  After being bitten by this once or twice
> in my early Unix years, I stopped making commands called "test" and made
> commands called "foo", "bar", "foobar", etc.
This is a very good point, and one example on Debian Wheezy:
Look at /usr/bin/test
and see 
'man test'
or 
'info coreutils 'test invocation''
-------
http://elchanate.org/

Back to linux.debian.user | Previous | Next | Find similar | Unroll thread


Thread

Re: My bash script is missing something - what? gricketson <gricketson@elchanate.org> - 2016-10-10 19:40 +0200

csiph-web