replace tail with sed

Alan Modra amodra@gmail.com
Mon Nov 24 11:25:17 GMT 2025


The default Solaris tail doesn't support "tail -n +4", apparently.
Use sed instead.

	PR 33396
	* testsuite/binutils-all/objdump.exp: Replace tail with an
	equivalent sed expression in dwarf5 objdump -Wi test.

diff --git a/binutils/testsuite/binutils-all/objdump.exp b/binutils/testsuite/binutils-all/objdump.exp
index f3142b10442..5854c3d2e74 100644
--- a/binutils/testsuite/binutils-all/objdump.exp
+++ b/binutils/testsuite/binutils-all/objdump.exp
@@ -595,7 +595,7 @@ if { ![is_elf_format] } then {
        send_log "\n"
     }
 
-    set got [remote_exec host "tail -n +4 tmpdir/objdump.out" "" "/dev/null" "tmpdir/objdump.tail"]
+    set got [remote_exec host {sed -e 1,3d tmpdir/objdump.out} {} /dev/null tmpdir/objdump.tail]
     set output [remote_upload host tmpdir/objdump.tail]
 
     if ![file size $output] then {

-- 
Alan Modra


More information about the Binutils mailing list