Read the record from a text file

Hi

I want to read one row record from a text file.

For eg: I have Sample.txt file with one row of record like

123456768

I want to get the above value from the file and assign it to a variable in my script. Please guide me how to proceed.

Thanks,
Soll

some way with the shell

exec 3<> file  #open file handle 3
read line <&3 #read one line
echo $line 
3<&- #close file descriptor   
read line < file
head -1 file

Using ksh

$ cat file
123456768
$ str=$(<file)
$ echo $str
123456768
$