我的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。
答案 0 :(得分:5)
GNU tail 不支持此语法。请改用tail -n +3 "$argv[1]"
。
如果您正在使用例如bash,dash或zsh as shell:
您还需要在命令行中修改>!
到>
:
csh bbox.csh plt > plt_P1.ps
答案 1 :(得分:1)
Tail打印文件的最后10行(默认情况下)。使用-n选项可以获得更多行。