Hi all,
I need to run a bunch of commands seperated by ; but then count the total lines of output. Pipes and redirection don't seem to be helping me. Anyone know how I can do this properly:
ls /usr/bin/nslookup ; ls /usr/sbin/lsof ; ls /sbin/ifconfig ; ls /usr/sbin/dmidecode ; ls /sbin/ethtool ; ls /bin/netstat | wc -l
... assuming all files exist I would like to see '6' as the result. But I get '1' because it's not aggregating the output all the way to the wc. Same result if I use & or > between commands instead of ;
Help?