The issue is about how a current session is looked for. If session names are like abc, abc-1, abc-2, then grep -i abc can give an incorrect result as all of those will pop out.
Possible solutions:
to store session ID and not use grep for its name
to fix grep e.g., check for the exact match in the whole line
The issue is about how a current session is looked for. If session names are like abc, abc-1, abc-2, then grep -i abc can give an incorrect result as all of those will pop out.
Possible solutions: