Commit 902f9f3c authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: fix awk script for Ubuntu

mawk doesn't handle '\<...\>'

Ubuntu:
$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
$ ldd /bin/ps
	linux-vdso.so.1 =>  (0x00007fffb290a000)
$ ldd /bin/ps  | awk '/\<linux-vdso\.so\>/ { print $1 }'
$ ldd /bin/ps  | awk '/linux-vdso\.so/ { print $1 }'
linux-vdso.so.1

Fedora:
$ ldd /bin/ps
	linux-vdso.so.1 =>  (0x00007fff61fcb000)
$ ldd /bin/ps  | awk '/\<linux-vdso\.so\>/ { print $1 }'
linux-vdso.so.1
$ awk --version
GNU Awk 4.1.1, API: 1.1
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a2e0acfd
...@@ -436,9 +436,9 @@ construct_root() ...@@ -436,9 +436,9 @@ construct_root()
local libs=$(ldd $test_path $ps_path | awk ' local libs=$(ldd $test_path $ps_path | awk '
!/^[ \t]/ { next } !/^[ \t]/ { next }
/\<linux-vdso\.so\>/ { next } /linux-vdso\.so/ { next }
/\<linux-gate\.so\>/ { next } /linux-gate\.so/ { next }
/\<not a dynamic executable$/ { next } /not a dynamic executable$/ { next }
$2 ~ /^=>$/ { print $3; next } $2 ~ /^=>$/ { print $3; next }
{ print $1 } { print $1 }
') ')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment