📜  shell 命令读取第一行 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:34.787000             🧑  作者: Mango

代码示例1
# credit to the Stack Overflow user in the source link
# the line is stored in a variable, remove 'line=' to print on display

line=$(head -n 1 filename)