Extract resultset numeric value from isql output ?

isql output comes as below,
(0 rows affected)
(1 row affected)
(7 rows affected)
How to extract the resultset number alone from the particular line ??

such as
0
1
7

Hi,

Try this,

awk -F " " '{print $1}' filename | cut -c 2-

grab isql ouput in a file.

sed "s# *(\(.\).*#\1#" filename

Thanks,
penchal

awk '{$0=$1;sub(".",x)}1'