Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Smile how to add some text to a file from a command line?


    Hi,

    How can one add some text to the end of the file from the command line without opening the file?

    I mean something like:

    # <some command> "text" >> myfile.txt

    or something similar if this doesn't make any sence

    Thanks a lot!

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,776
    Code:
    echo "text" >> myfile.txt
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •