Hello,
I'm trying to write a bash one liner that finds some files, and for each file it appends a string to the end of them. I tried several attempts with no luck.
Code:
find . -name "*.txt" -exec echo "append_this_string" >> `echo {}` \;
OR
Code:
find . -name "*.txt" -exec echo "append_this_string" >> {} \;
Both the these examples do not work. I tried googling and reading man pages, but couldn't find anything. Since my bash skills aren't very good, I was hoping someone could help me out.
I figured I could write a script, but I was hoping I could do it with a simple one-liner. (to impress the ladies
)
Thanks,
djgerbavor3