Не могли бы вы попробовать следующее, написанное и протестированное только на основе показанных вами образцов.
awk '
{
split($1,array,";")
num1=split($2,array1,";")
num2=split($3,array2,";")
min=array1[1]
for(i=2;i<=num1;i++){
min=(min<array1[i]?min:array1[i])
}
max=array2[1]
for(i=2;i<=num2;i++){
max=(max>array2[i]?max:array2[i])
}
print array[1],min,max
}' Input_file
Пояснение: Добавление подробного объяснения к вышеизложенному.
awk ' ##Starting awk program from here.
{
split($1,array,";") ##Splitting 1st field into array with separator as ; here.
num1=split($2,array1,";") ##Splitting 2nd field into array1 with separator as ; here.
num2=split($3,array2,";") ##Splitting 3rd field into array2 with separator as ; here.
for(i=1;i<=num1;i++){ ##Running for loop till vale of num1 which is total elements in array1.
min=(min<array1[i]?(min?min:array1[i]):array1[i]) ##Creating min here which is using ternary operator to check if current element of array1 is lesser than min then keep it else keep min current value and so on comparing each element one by one here.
}
for(i=1;i<=num2;i++){ ##Running for loop till value of mun2 which is total elements in array2.
max=(max>array2[i]?max:array2[i]) ##Creating max here using ternary operator checks if max value greater than array2 current value then keep it as it is else assign current value of array2 to max here.
}
print array[1],min,max ##Printing 1st element of array then min and max here.
min=max="" ##Nullifying variables min and max here.
}' Input_file ##Mentioning Input_file names here.