Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16565
| From | Jeffrey Walton <noloader@gmail.com> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Segfault in Bash |
| Date | 2020-07-14 06:32 -0400 |
| Message-ID | <mailman.182.1594722779.2306.bug-bash@gnu.org> (permalink) |
| References | <CAH8yC8nB5fhvvdD1bCUsgNzNTni4ixkjDbfeKQLNVqZ71HpxBg@mail.gmail.com> |
Hi Everyone,
I'm working on a script to find all shared objects in a directory. A
filename should match the RE '*.so$'. I thought I would pipe it to
grep:
$ ./audit-libs.sh /home/jwalton/tmp/ok2delete/lib
./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped)
$(echo "$file" | grep -E "*.so$")
./audit-libs.sh: line 17: 22934 Segmentation fault (core dumped)
$(echo "$file" | grep -E "*.so$")
./audit-libs.sh: line 17: 22939 Segmentation fault (core dumped)
$(echo "$file" | grep -E "*.so$")
...
My code is broken at the moment. I know I am the cause of Bash's
crash. But I feel like Bash should not segfault.
IFS="" find "$dir" -name '*.so' -print | while read -r file
do
if ! $(echo "$file" | grep -E "*.so$"); then continue; fi
echo "library: $file"
done
Are you guys interested in the segfault?
Back to gnu.bash.bug | Previous | Next | Find similar
Segfault in Bash Jeffrey Walton <noloader@gmail.com> - 2020-07-14 06:32 -0400
csiph-web