Linux 为什么尾巴不在这里工作?

Linux 为什么尾巴不在这里工作?,linux,bash,csh,Linux,Bash,Csh,我的csh脚本 #!/bin/csh # C-schell script to increase the boundingbox.... echo '%\!PS-Adobe-3.0 EPSF-3.0' echo '%%BoundingBox: 0 0 1100 1100' tail +3 $argv[1] 在这里打电话 csh bbox.csh plt >! plt_P1.ps 但我有 csh -f bbox.csh plt tail: cannot open ‘+3’ for re

我的csh脚本

#!/bin/csh
# C-schell script to increase the boundingbox....

echo '%\!PS-Adobe-3.0 EPSF-3.0'
echo '%%BoundingBox: 0 0 1100 1100'
tail +3 $argv[1]
在这里打电话

csh bbox.csh plt >! plt_P1.ps
但我有

csh -f bbox.csh plt
tail: cannot open ‘+3’ for reading: No such file or directory

tail
应该做什么?编写代码的人使用Darwin,我在Ubuntu 14.04上。

GNU tail不支持这种语法。改用
tail-n+3“$argv[1]”

如果您使用bash、dash或zsh作为shell: 您还需要修改
>到命令行中的

csh bbox.csh plt > plt_P1.ps

Tail打印文件的最后10行(默认情况下)。对更多行使用-n选项。

使用
tail-n+3…
。没有
-n
的表单几十年来一直被弃用,并非所有
tail
实现仍然允许它。@jofel工作得很好!但是csh bbox.csh plt>!请注意,我应该如何改变>!对于ubuntu?Bash脚本在达尔文是不同的。只需使用
而不是
>