<result><id>1</id><id>5</id><id>7</id></result> <result><id>71</id></result> <result><id>15</id><id>33</id></result>
cat input.txt | while read line; do echo $line | grep -o '<id>' | wc -l; done
3 1 2
No comments:
Post a Comment