append writing to file aswell
hi all,
im doing this command and appending it to a text document it works great find . -type f | wc -l >> oo.txt it appears like this in the file 180416 how do i get it to write something in the beginning like how many files = 180416 many thanks, rob |
>> will do only append, you need to use sed, awk or another tool to write before.
Or you can first write the given text into that file and execute your command afterward. |
echo 'File Count =' $(find . -type f | wc -l) >> oo.txt
Which is effectively just what Pan said to do. |
thanks dijetlo
|
No worries Rob, we all get by with a little help from our friends... :)
|
All times are GMT -5. The time now is 09:42 AM. |