shell scripts
1
sed -n '10p' textfile # get the 10th line of the textfile
12345678
# if 10th line is 192,102,200,201sed -n '10p' textfile | grep -o ',' | wc -l # answer is 3, count the occurrences of ','sed -n '10p' textfile | grep -o '[0-9]*' | wc -l # answer is 4, count the numssed -n '10p' textfile | grep -o "[0-9]*"" | wc -l # answer is 4, count the nums-o, --only-matching Print only the matched (non-empty) parts of a matching line, with each such part on a separate output line