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


Groups > linux.debian.user > #173408 > unrolled thread

Re: My bash script is missing something - what?

Started bygricketson <gricketson@elchanate.org>
First post2016-10-10 19:40 +0200
Last post2016-10-10 19:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.debian.user


Contents

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

#173408 — Re: My bash script is missing something - what?

Fromgricketson <gricketson@elchanate.org>
Date2016-10-10 19:40 +0200
SubjectRe: My bash script is missing something - what?
Message-ID<sqMIp-441-25@gated-at.bofh.it>
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/

[toc] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web