Hello,
I need to read from a file consisting of only one integer and enter that number into variable.can anyone help?
the script is written in cshell.
thanks.
var=`cat file`
thanks a lot.works great.
With bash and ksh you can also do :
var=$(<file)
Jean-Pierre.
Top Ten Reasons not to use the C shell
Csh problems
Csh Programming Considered Harmful
In any Bourne-type shell:
read var < file