diff --git a/test/system/035-logs.bats b/test/system/035-logs.bats index a606b772e2..9868d4e3cf 100644 --- a/test/system/035-logs.bats +++ b/test/system/035-logs.bats @@ -398,16 +398,21 @@ $content--2.*" "logs --until -f on running container works" # Hand-craft a log file with partial lines and carriage returns run_podman inspect --format '{{.HostConfig.LogConfig.Path}}' $cname logpath="$output" - timestamp=$(awk '{print $1}' <"$logpath") + timestamp=$(head -n1 "$logpath" | awk '{print $1}') cr=$'\r' nl=$'\n' - cat >| $logpath < $logpath <