[CentOS] [OT] Bash help
Gordon Messmer
gordon.messmer at gmail.comThu Oct 26 16:37:51 UTC 2017
- Previous message: [CentOS] [OT] Bash help
- Next message: [CentOS] [OT] Bash help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Oct 25, 2017 at 9:47 AM, Warren Young <warren at etr-usa.com> wrote: > > This screams out for associative arrays. (Also called hashes, dictionaries, maps, etc.) > > That does limit you to CentOS 7+, or maybe 6+, as I recall. CentOS 5 is definitely out, as that ships Bash 3, which lacks this feature. Nonsense. Every POSIX shell has an associative array called "the filesystem." (hash=$(mktemp -d); while read addr msgs; do echo $msgs >> "$hash/$addr"; done; cd "$hash"; for x in *; do echo "$x $(paste -s -d+ < $x | bc)"; done;) < msg-counts
- Previous message: [CentOS] [OT] Bash help
- Next message: [CentOS] [OT] Bash help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list