Hi,
I currently writing a ksh script but i'm stuck. Example of what I'm trying to do. find . -name "*.doc" -print or ls -ltr ¦grep .doc ¦awk '{print $9}' either way this will list all documents in the current directory that have extensions ending in .doc. What I want though is to find out how many instances of .docs there are from the generated list as above. So if the list brings back 5 .docs I want to be able to set a variable to state that 5 documents were found. Any ideas how to do this? Cheers Marc |
grep -c , or wc -l the output of print $9
Steve [Edited by stevem2k - 7/22/2003 4:06:15 PM] |
excellent mate - thats it.
Thanks Marc :) |
'ls -l *.doc | wc -l' should be all you need.
|
All times are GMT +1. The time now is 07:27 AM. |
© 2024 MH Sub I, LLC dba Internet Brands