Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

operators available in bash versions

0 views
Skip to first unread message

Gerard

unread,
Nov 30, 2009, 6:12:35 AM11/30/09
to bug-...@gnu.org

I apologize for asking what is probably a dumb question, but where can
I find a definitive listing of what features are available in each
version of Bash.

For example, I only have access to Bash-4 on my system. I need to know
if " $(< " also works on Bash < 4. I also have a few questions
regarding array handling.

I am running FreeBSD-7.2 and installed Bash via ports.

--
Gerard
ger...@seibercom.net

|::::=======
|::::=======
|===========
|===========
|

Too much is not enough.

Lhunath (Maarten B.)

unread,
Nov 30, 2009, 6:14:36 AM11/30/09
to ger...@seibercom.net, bug-...@gnu.org
On 30 Nov 2009, at 12:12, Gerard wrote:

>
> I apologize for asking what is probably a dumb question, but where can
> I find a definitive listing of what features are available in each
> version of Bash.
>
> For example, I only have access to Bash-4 on my system. I need to know
> if " $(< " also works on Bash < 4. I also have a few questions
> regarding array handling.
>
> I am running FreeBSD-7.2 and installed Bash via ports.
>

The following is not a bad reference:

http://mywiki.wooledge.org/BashFAQ/061


Mike Frysinger

unread,
Nov 30, 2009, 11:15:38 AM11/30/09
to bug-...@gnu.org, ger...@seibercom.net
On Monday 30 November 2009 06:12:35 Gerard wrote:
> I need to know if " $(< " also works on Bash < 4.

it's been around for pretty much all time. bash-2 had it for sure, and that
is ancient.
-mike

signature.asc

Greg Wooledge

unread,
Nov 30, 2009, 12:12:17 PM11/30/09
to Mike Frysinger, bug-...@gnu.org

It doesn't exist in bash 1.14.7, which is the oldest version I have
available. It does exist in 2.04, which is the second oldest I have.


Mike Frysinger

unread,
Nov 30, 2009, 12:35:32 PM11/30/09
to Greg Wooledge, bug-...@gnu.org

bash-2 was released over a decade ago and for doing any realistic work, that
is the same as 'all time'. realistically, you're going to run into
portability problems with the tools run in the script rather than the script
itself.
-mike

signature.asc

Greg Wooledge

unread,
Nov 30, 2009, 12:43:44 PM11/30/09
to Mike Frysinger, bug-...@gnu.org

Funny thing, how all those scripts I have to write for the machine with
bash 1.14.7 don't count as "realistic"....

Though you're right about the toolset being the main issue. I had
to find a way to express things for the older version of GNU date
(from sh-utils, before coreutils was called coreutils) on that box.
Fortunately, my needs weren't very complex.


Antonio Macchi

unread,
Nov 30, 2009, 1:14:03 PM11/30/09
to gnu-ba...@moderators.isc.org
Gerard wrote:
> I apologize for asking what is probably a dumb question, but where can
> I find a definitive listing of what features are available in each
> version of Bash.
>
> For example, I only have access to Bash-4 on my system. I need to know
> if " $(< " also works on Bash < 4. I also have a few questions
> regarding array handling.
>
> I am running FreeBSD-7.2 and installed Bash via ports.
>


could this be a good way to achive this?


$ wget http://ftp.gnu.org/gnu/bash/bash-2.0.tar.gz
--2009-11-30 19:08:52-- http://ftp.gnu.org/gnu/bash/bash-2.0.tar.gz
Resolving ftp.gnu.org... 140.186.70.20
Connecting to ftp.gnu.org|140.186.70.20|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1349450 (1.3M) [application/x-tar]
Saving to: `bash-2.0.tar.gz.1'

100%[======================================>] 1,349,450 285K/s in
5.6s

2009-11-30 19:09:09 (237 KB/s) - `bash-2.0.tar.gz.1' saved [1349450/1349450]

$ tar -zxf bash-2.0.tar.gz bash-2.0/doc/FAQ -O | grep "What.s new in
version"
10) What's new in version 2.0?
10) What's new in version 2.0?

$ wget http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz

[etc.]


Allodoxaphobia

unread,
Nov 30, 2009, 7:05:09 PM11/30/09
to gnu-ba...@moderators.individual.net
(Didn't have the OP on the server to followup to. SRI)

> On 30 Nov 2009, at 12:12, Gerard wrote:
>>
>> I apologize for asking what is probably a dumb question, but where can
>> I find a definitive listing of what features are available in each
>> version of Bash.
>>
>> For example, I only have access to Bash-4 on my system. I need to know
>> if " $(< " also works on Bash < 4. I also have a few questions
>> regarding array handling.
>>
>> I am running FreeBSD-7.2 and installed Bash via ports.

You can, doncha know, install ports into $HOME?
Ergo, you could install bash 3.x and one or more earlier versions
in $HOME/bin/ and test your scripts to your heart's content.

I found the install 'tricks' via Google, but I don't remember the
keywords I succeeded with beyond 'freebsd' and 'ports' now...

I successfully installed `alpine` in my FreeBSD shell account
at a time when the SysAdmin only had `pine` installed. WFM

HTH & GL
Jonesy
--
Marvin L Jones | jonz | W3DHJ | linux
38.24N 104.55W | @ config.com | Jonesy | OS/2
* Killfiling google & XXXXbanter.com: jonz.net/ng.htm


Gerard

unread,
Dec 1, 2009, 6:12:09 AM12/1/09
to bug-...@gnu.org
On 1 Dec 2009 00:05:09 GMT
Allodoxaphobia Allodoxaphobia <bit-b...@config.com> replied:

> You can, doncha know, install ports into $HOME?
> Ergo, you could install bash 3.x and one or more earlier versions
> in $HOME/bin/ and test your scripts to your heart's content.
>
> I found the install 'tricks' via Google, but I don't remember the
> keywords I succeeded with beyond 'freebsd' and 'ports' now...
>
> I successfully installed `alpine` in my FreeBSD shell account
> at a time when the SysAdmin only had `pine` installed.

I have neither the time, inclination to install multiple versions; nor
the morbid fasination to observe what possible system damage may
eventually occur due to that enterprise. If I were writing a script
for eventual mass distribution, I would set up multiple stations, with
various operating systems, and shell versions and do a legitimate test.
I am actually writing for in-house use. I was simply inquiring for
information since I have one of the only two PCs in my organization that
have Bash-4 installed. The others all have various versions of Bash-3.
As each unit is replace, it is updated to the latest OS and software
versions. With the economy as it is, that is not about to happen any
time soon.


--
Gerard
ger...@seibercom.net

|::::=======
|::::=======
|===========
|===========
|

The opulence of the front office door varies
inversely with the fundamental solvency of the firm.

0 new messages