how to take only one input in html as numbers code example
Example 1: php keep only numbers in string
$str = preg_replace('/[^0-9.]+/', '', $str);
Example 2: write a bash script that accepts a text file as argument and calculates number of occurrences of each words in it and return them as key value pairs
file=/home/stefan/ooxml1.txt
for word in $(sed 's/[^A-Za-z]/ /g' $file | tr " " "\n" | sort -u)
do
echo -n "$word "
grep -c $word $file
done | sort -k2 -n