How to add some content in any file at some desired location
without using VI or some other editor in UNIX
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sujitha
We can use "Cat" command same as to work like VI to create
and save a file
example : cat>filename
Hi { we can enter content }
Hello
----
------
(ctrl+c) - It will Save in a file
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the different types of shell scripting?
Tell something about the super block in shell scripting?
How can the contents of a file inside jar be read without extracting in a shell script?
What is gui scripting?
Is shell scripting useful?
Hi Friends, I am currently Undergoing Course On Testing.I am Planning To Keep Fake Resume.Can any One tell me the ways to Prepare i.e, Real Time experience For Manual Testing. With Regards, Vikram
Is cmd a shell?
What's the difference between scripting and coding?
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
What is path in shell script?
How can we find the process name from its process id?
How to change our default shell?