Home > Mobile >  How to append multiple data to a file?
How to append multiple data to a file?

Time:10-29

I have a file called updatelog where I would like to be adding new updates to it

I tried:

date; message >> updatelog.txt
date   message >> updatelog.txt
date & message >> updatelog.txt
date | message >> updatelog.txt
date && message >> updatelog.txt

But nothing seems to work, what I'm doing wrong?

CodePudding user response:

How about this approach?

date >> updatelog.txt && echo "A sample message" >> updatelog.txt
  • Related