On 9/4/22 10:48 PM, Hyunho Cho wrote:
Bash Version: 5.1
Patch Level: 16
Release Status: release
##############################################################
#### "gcc --help" is already a short string, but the system hangs.
( without using extended pattern, there is no such problem )
bash$ help=$( gcc --help )
bash$ echo "${help//+([$' \t\n'])/ }"
If you want the output in a single string, this is a two-liner with sed and
mapfile, and it runs the 90K output of gcc --help in about a tenth of a
second on my machine.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/