Problem with cut command

I am trying to take one part of my text from file and save it to variable $x

I tryed this...

x=`cut -c 6-9 $fajl`

my file looks like this

fajl:

21890001277 89386911 23638FBCDC 28EE01A1 0000 26855 124 244326
21890001277 89766911 23638FBCDC 28E021A1 0000 26557 134 684326
21890001277 89387661 23638FBCDC 28EE0211 0000 68557 234 682443
....
..

etc. of course values in file are diff.
All I need it to store value of first field first coloumn in X variable for further comparation...
can I use cut command for that??

and I forgot to say resoult with this code is

x = 0012
0012
0012
....(etc. )

and I need just to be x = 0012

just process it through a loop

while read line
do
x=`echo $line | cut -c 6-9`
echo $x
done < file

is that what you had requested ?

no I just want my x variable to be first line of output

resoult of

while read line
do
x=`echo $line | cut -c 6-9`
echo $x
done < file

is x=0012
0012
0012
...
basicly it takes colomns 6-9 from my file and stores it to x
I just want it to take 6-9 colomns from first line that is all not all lines

Original

x=`cut -c 6-9 $fajl`

New

x=`head -1 $fajl | cut -c 6-9 `

thanx head head how could I forgot that ...sometimes brain just blockes...

thanks buddy

you can use set to assign to $1 to $9


primadA$ x="hello there old chap"
primadA$ set -- $x
primadA$ echo $4 $3 $2 $1        
chap old there hello

or read:


primadA$ echo hello there old chap |  while read a b c d;do echo $d $c $b $a;done
chap old there hello