hi guys,
i have close bracket ")" accross the file
but i want to take the line number where only once close bracket exist in the line.
Please help me in SED command
i should loop through the file.
hi guys,
i have close bracket ")" accross the file
but i want to take the line number where only once close bracket exist in the line.
Please help me in SED command
i should loop through the file.
grep -n ')' file
update :: sorry. didnt read about the "ONCE".
anchal,
i think i hvnt explian the problem clearly
my file goes like this
.
.
hgdfhdf (sdfsdf) sdasd(asfds)
)
sdf(af)sdf))f
)
)
.
.
i want to know the line number which has only ) bracket in it.
as per above example file , only the 3 row has ). i want those row nr only.
grep -En '^)$' file
Gopal,
grep -n '^)$' file1 | cut -d: -f1
the above will give you list of line numbers where only ')' appears in the file1
/ilan