Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从file
file
> source ./rank file
使用这个脚本
set line = ($<) <- inside rank
但是当我进入
echo $line我什么都没有收到,我该如何更改?提前致谢
echo $line
由于 csh 是脑死亡,你必须做这样的事情:
set line = `head -n 1 filename`
set line = `cat file | sed 1q`
它内置在 Bash 中:
read -r line < filename