forked from Karylab-cklius/vllm
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
21 lines
529 B
Bash
21 lines
529 B
Bash
#!/bin/bash
|
|
# Usage: ./ci_clean_log.sh ci.log
|
|
# This script strips timestamps and color codes from CI log files.
|
|
|
|
# Check if argument is given
|
|
if [ $# -lt 1 ]; then
|
|
echo "Usage: $0 ci.log"
|
|
exit 1
|
|
fi
|
|
|
|
INPUT_FILE="$1"
|
|
|
|
# Strip timestamps
|
|
sed -i 's/^\[[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}T[0-9]\{2\}:[0-9]\{2\}:[0-9]\{2\}Z\] //' "$INPUT_FILE"
|
|
|
|
# Strip Buildkite inline timestamp markers (ESC _bk;t=<ms> BEL)
|
|
sed -i 's/\x1B_bk;t=[0-9]*\x07//g' "$INPUT_FILE"
|
|
|
|
# Strip colorization
|
|
sed -i -r 's/\x1B\[[0-9;]*[mK]//g' "$INPUT_FILE"
|