Originally Posted by Salem Something suitably cryptic... $ perl -n -e '$n = ( $_ =~ s/grow//g );print "$n\n";' old#<grown or young><growup 2 grow grow grow 3 Thank you for your answer.I have a few questions.. Is this suitable for a bash script? Also I only want the substring <grow If there's a mere grow without the < in the front I dont want to count it.