UNIX command for edit a file

Posted on 2007-07-23
Last Modified: 2010-04-20
Dear experts,

What is the UNIX command to add a string "abc" to a file def.txt?

Question by:isuhendro
    LVL 19

    Accepted Solution

    echo "abc" >> def.txt

    or were you looking for something a little more sophisticated?

    Author Comment

    hi alexoft,

    actually your command is work properly when i tested in shell.. but when i wrote under karajan script, it does not work.. just afraid karajan not supporting a kind of ">>"
    do you have any other option?

    Author Comment

    hi alexoft,

    i managed to get the answer for karajan.
    anyway, your answer is correct for shell. THANKS!

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
    Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now