diff --git a/scripts/autotest_common.sh b/scripts/autotest_common.sh index ec9cfe10cf..a2f059595d 100755 --- a/scripts/autotest_common.sh +++ b/scripts/autotest_common.sh @@ -82,7 +82,7 @@ function timing_finish() { function process_core() { ret=0 for core in $(find . -type f -name 'core*'); do - exe=$(eu-readelf -n "$core" | grep psargs | awk '{ print $2 }') + exe=$(eu-readelf -n "$core" | grep psargs | sed "s/.*psargs: \([^ \'\" ]*\).*/\1/") echo "exe for $core is $exe" if [[ ! -z "$exe" ]]; then if hash gdb; then