December 24th, 2012, 11:47 AM
Single count of files from multiple commands
I am executing the below command. It is working properly, displaying all file names
However, I'd like to revise this command to receive the total number of files listed.
For example, the "ls" command has 3 total files, and the find command has 15 total files. I want the combined total (18)
ls /ImageRight/*.[Tt][Xx][Tt] && find /ImageRight/Import/FUP/fupMonitor/backup -type f | grep -i "/i.*\.FUP"
December 24th, 2012, 12:01 PM
You could pipe the whole lot through "wc -l"
December 24th, 2012, 01:40 PM
Or use the -c option on the grep?
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc