aboutsummaryrefslogtreecommitdiff
path: root/scripts/course-daily-update.py
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-23 18:32:25 +0200
committerAgando <roduccomm@gmail.com>2026-10-23 18:32:25 +0200
commitb0404b1c9154c3438d0e124d69dc25d9140cfac4 (patch)
treeb39d11720c803e2586b4b1a06ae3230c9a98dffd /scripts/course-daily-update.py
parent87f44c42aeb763e2aaf3da159d60b252dca9aa53 (diff)
fix(newos4): grep, head and tail take every path argument (v4.6.67)
Packet 1's multi-path ask was only honoured by wc in v4.6.58 — grep read only args[ai+1] and head/tail only positional[0], so `grep x a b` searched `a`, printed one file's hits, and exited 0. Same silent drop, three more commands. - grep: loops every path; multiple files print `file:line: text`, `-c` prints one count per file, missing files are reported per file and excluded from the summary count; single-file output unchanged - head: every path, `==> file <==` header when more than one; `head f 40` still works - tail: every path with headers; a numeric second positional is still the legacy `tail <file> <count>`; `-f` warns and follows only the first file instead of printing all of them and claiming otherwise Verified live on v4.6.67: grep "bug_id" a b -> a:2 + b:3 + "2 match(es) in 2 file(s)" grep -c "alpha" a b -> one count per file grep "alpha" a missing -> hits from a, per-file error, "in 1 file(s)" head -n 1 a b -> header + first line for each tail -n 1 a b -> header + last line for each tail a 2 -> legacy count still honoured tail -f a b -> warns, follows a only
Diffstat (limited to 'scripts/course-daily-update.py')
0 files changed, 0 insertions, 0 deletions