I have two files
File 1:
7118 7457 7591 7539 8001
File 2:
5003 5008 5011 5026 5028 5029 5031
Output t
And a bash function:
function cross() { exec 3<$2 while read -u 3 a ; do exec 4<$1 while read -u 4 b ; do echo $b,$a done done 3<&- 4<&- }