更新 script-examples/code/ex01.sh

This commit is contained in:
2024-07-24 21:38:06 +08:00
parent 2392bb001b
commit 081e6a74a7

View File

@@ -9,7 +9,7 @@ cat hello.c | wc -l
# 方法 3
wc -l hello.c
# 关于方法2 和 方法3 的说明:最后一行必须是空格不然获取的行数不准确
# 关于方法2 和 方法3 的说明:最后一行必须是空格, 不然获取的行数不准确
# 方法 4
awk '{print NR}' hello.c | tail -n1