On 7/14/20 12:02 PM, Ilkka Virta wrote:
> On 14.7. 16:08, Chet Ramey wrote:
>> On 7/14/20 6:32 AM, Jeffrey Walton wrote:
>>> ./audit-libs.sh: line 17: 22929 Segmentation faultĀ (core dumped)
>>> $(echo "$file" | grep -E "*.so$")
>>
>> Bash is reporting that a process exited due to a seg fault,
On 14.7. 16:08, Chet Ramey wrote:
On 7/14/20 6:32 AM, Jeffrey Walton wrote:
./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped)
$(echo "$file" | grep -E "*.so$")
Bash is reporting that a process exited due to a seg fault, but it is
not necessarily a bash process.
As a sugge
On 14.7. 13:32, Jeffrey Walton wrote:
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:
IFS="" find "$dir" -name '*.so' -print | while read -r file
do
if ! $(echo "$file" | grep -E "*
On 7/14/20 6:32 AM, Jeffrey Walton wrote:
> 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 Se
> > IFS="" find "$dir" -name '*.so' -print | while read -r file
> > do
> > if ! $(echo "$file" | grep -E "*.so$"); then continue; fi
> > echo "library: $file"
> >
> > done
Also, I forgot to point out: your "if" line is executing each of
the shared libraries that you find. Every one of th
On Tue, Jul 14, 2020 at 06:32:44AM -0400, Jeffrey Walton wrote:
> $ ./audit-libs.sh /home/jwalton/tmp/ok2delete/lib
> ./audit-libs.sh: line 17: 22929 Segmentation fault (core dumped)
> $(echo "$file" | grep -E "*.so$")
This grep regular expression is not valid. The * symbol in a regular
expr