how to read rows?
I'm trying to read first row from t开发者_Go百科he file
> source ./rank file
using this script
set line = ($<) <- inside rank
but when I enter
echo $line
I receive nothing, how can I change it? thanks in advance
Since csh is brain-dead, you'll have to do something like this:
set line = `head -n 1 filename`
It's built-in in Bash as:
read -r line < filename
set line = `cat file | sed 1q`
精彩评论