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



How to add some content in any file at some desired location without using VI or some other editor..

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

How to add some content in any file at some desired location without using VI or some other editor..

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

Post New Answer

More Shell Script Interview Questions

What is a shell made of?

0 Answers  


How can I Debug a shell scripts and Perl scripting?? or How do you debug a shell scripting and perl scripting ( at the compile time error or run time error) in Unix environment ?

4 Answers  


How do you find out What is your shell?

0 Answers  


What are the zombie processes?

0 Answers  


Is shell scripting useful?

0 Answers  


What are the Different types of shells?

5 Answers  


Is scripting and coding the same thing?

0 Answers  


How to print pid of the current shell?

0 Answers  


Is bash a shell script?

0 Answers  


What is bash coding?

0 Answers  


Create a bash shell script that reads a line from the user consisting of 5 words and then prints them out in reverse order. Name this script "reverse.sh"

1 Answers  


how to read systems current date and time

4 Answers  


Categories