You can do that with "wc",
1. wc - l for the number of lines
2. wc -w for the number of words
Hoe should one combine these 2, let's say if I want to multiply the number of words with the number of lines from file a and b respectively?
Thanks
You can do that with "wc",
1. wc - l for the number of lines
2. wc -w for the number of words
Hoe should one combine these 2, let's say if I want to multiply the number of words with the number of lines from file a and b respectively?
Thanks
Look into bc and dc.
My best code is written with the delete key.
For a file named e.c:
Code:echo `expr $(cat e.c|wc -l) \* $(cat e.c|wc -c)`