summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBreno Rodrigues Guimarães <brenorg@gmail.com>2023-03-08 16:35:12 -0300
committerGitHub <noreply@github.com>2023-03-08 16:35:12 -0300
commit80f68669368ecfaac342077eb70109fb3c5d0ac7 (patch)
treea93853a74f4a168d00849b7cfdb3c9732e34ee44
parent9f1c0af97b947687d3f916e10baa405b11d57584 (diff)
downloadpatchelf-80f68669368ecfaac342077eb70109fb3c5d0ac7.tar.gz
Filter with awk instead of grep
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
-rwxr-xr-xtests/set-rpath-library.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/set-rpath-library.sh b/tests/set-rpath-library.sh
index 55a4c16..6ae1715 100755
--- a/tests/set-rpath-library.sh
+++ b/tests/set-rpath-library.sh
@@ -61,7 +61,7 @@ fi
# ALL loads should have the same alignment
lib="${SCRATCH}/liboveralign.so"
../src/patchelf --set-rpath "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" "$lib"
-num_alignments=$(${READELF} -W -l "${lib}" | grep LOAD | awk '{ print $NF }' | sort -u | wc -l)
+num_alignments=$(${READELF} -W -l "${lib}" | awk '/LOAD/ { print $NF }' | sort -u | wc -l)
echo "$num_alignments"
if test "${num_alignments}" -ne "1"; then
exit 1