Hi,
Using awk, I have taken the output of a command and entered it into an array. Afterwards, I want to test to see if each item in the array matches a certain 1st few letters of a string like below:
for (item in array)
if (array[item] == "issv"
{
print array[item]
}
There are multiple items in the array that would match the "issv" string like below:
issv400
issv406
issv301
I have tried to say if (array[item] == "issv*", but it wont match the 3 above. The only way it will work is if I say if (array[item] == "issv400".
I know there has to be a way to match all the items that match the "issv" part.
Any help would be appreceiated.
Using awk, I have taken the output of a command and entered it into an array. Afterwards, I want to test to see if each item in the array matches a certain 1st few letters of a string like below:
for (item in array)
if (array[item] == "issv"
{
print array[item]
}
There are multiple items in the array that would match the "issv" string like below:
issv400
issv406
issv301
I have tried to say if (array[item] == "issv*", but it wont match the 3 above. The only way it will work is if I say if (array[item] == "issv400".
I know there has to be a way to match all the items that match the "issv" part.
Any help would be appreceiated.