就像我有这样一个数据
1 -> (abc
2-> abc)
一个有左括号,两个有右括号.
I am expecting like I have txt file I have both mistakes while entering and missing want to echo all the occurrence of opening but absence of closing while another one is if only closing present. I am using bash code but it only shows for occurrence of opening but absence of closing parenthesis my code is grep -E '^[^()]*\([^()]*$|^[^()]*[^()]*\([^()]*$'
and this shows only result for ( abc
but not for abc)
. please help me out Thanks.