Suppose I have a file text.txtas shown below:
she likes cats, and he likes cats too.
I would like my result to look like this:
she 1
likes 2
cats 2
and 1
he 1
too 1
If put space , .into it, it will simplify the scripts, it will be fine.
Is there a simple shell pipeline that could achieve this?
source
share