thanks for all the replies, it's appreciated
kurumi - it is solaris that i am using and it does not have ruby installed
scrutinizer - i get the followong when i try your suggestion ...
sed 's/^/^/' file2 | grep -f- file1
BTWsed: Command not found
grep: illegal option -- f
grep: illegal option -- -
Usage: grep -hblcnsviw pattern file . . .
rdcwayx - doe s not produce the output i desire, and seems to duplicate items ...
xargs -i grep ^{} file1 < file2
234GH
5234BTW
89er
678tfg
234
234YT
tfg456
wert
78gt
gh23444
234GH
5234BTW
89er
678tfg
234
234YT
tfg456
wert
78gt
gh23444
234GH
5234BTW
89er
678tfg
234
234YT
tfg456
wert
78gt
gh23444
234GH
5234BTW
89er
678tfg
234
234YT
tfg456
wert
78gt
gh23444
Apologies if i have misunderstood any of you, newbie here so its all new to me.
Thanks