Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was using bash3 up to now, and just got a copy of the latest version

$ ./bash --version
GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$

What are the major changes/feature additions in version 4 over version 3?

share|improve this question
    
As an aside, one can get the current running version of bash by typing Ctrl^xv – Theophrastus May 26 at 17:56
up vote 6 down vote accepted

The NEWS file lists the features that were added in each version.

Most notably in 4.0 I see a couple of improvements to the autocompletion infrastructure, the (optional) addition of the ** glob operator, associative arrays and various syntactic shortcuts.

share|improve this answer
1  
Also the autocd option — it doesn't look like much, but as a zsh user, it's what I miss most when I occasionally use bash (<4 or unconfigured). – Gilles Oct 23 '10 at 21:41

Most importantly for the behavior of old scripts, the behavior with set -e has slightly changed, among other things for ( ...), [[ ... ]], and (( ... )).

The new behavior is said to be documented in the manual.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.