How to add some content in any file at some desired location
without using VI or some other editor in UNIX
Answer Posted / tony
A one line piece of text can always be added like this:
$ echo "Please add this text" >> file.txt
A file (a text file preferably) can be added:
$ cat inputfile.txt >> outputfile.txt
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to check if a directory exists?
What is echo in shell?
Is shell scripting useful?
Write a shell script to get current date, time, user name and current working directory.
What does it mean by #!/Bin/sh or #!/Bin/bash at the beginning of every script?
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
What is the way to do multilevel if-else's in shell scripting?
What are filters explain sort with all the options available?
What is mac default shell?
Given a file find the count of lines containing the word "abc".
Tell something about the super block in shell scripting?
What is shell scripting?
How will you find the 99th line of a file using only tail and head command?
Give some situations where typing error can destroy a program?
Why are shell scripts used?