bash4

Unable to use Checkjobs and Autocd in Bash 4

There are new commands in Bash 4: checkjobs and autocd. However, I did not find documentation for them at man bash I run unsuccessfully {checkjobs,autocd} I found the following in release notes There is a new `checkjobs` option that causes the shell to check for and report any running or stopped jobs at exit and There is a n...

Unable to enable globstar in Bash 4

I put the following unsuccessfully to my .bashrc shopt -s globstar I am trying to test the command in action by ls **/*.c and by comparing it to ls */*/*.c How can you enable globstar in Bash 4? ...

read error: 0: Resource temporarily unavailable

I have a bash script which prompts for user input multiple times and processes input in the background during the time the next input is expected. I keep getting this error once in while. read error: 0: Resource temporarily unavailable I suspected the background processes in my script would be causing this so I tried putting a < dev/n...

How is bash scripting affected by the bash4 release?

bash4 looks good on paper, and I think I'll build it and give it a test drive. In the meantime... Anyone who has done the same care to share their expierence? It would be particularly interesting to hear of any issues with old bash code. ...

How to iterate over assoziative array in bash

Based on an assoziative array in a bash script I need to iterate over it to get key & value. #!/bin/bash declare -A array array[foo]=bar array[bar]=foo I actually don't understand how to get the key while using a for-in loop. Thanks in advance! ...