Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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 are the different commands available to check the disk usage?

0 Answers  


why did you apply to shell

3 Answers   Shell,


In a file , how to retrieve the lines which are the multiples of 50 ? like 50,100,150th lines etc.

9 Answers   Amazon,


How are shells born?

0 Answers  


How to print the first array element?

0 Answers  


How will you pass and access arguments to a script in linux?

0 Answers  


What is the first line in every perl script called?

0 Answers  


How to initialize a directory size to a variable??

2 Answers  


Devise a script that takes file name as arguement(which must present in the current directory)and locates from your home directory tree all thpath names of its links.Then mail the list to self.

0 Answers  


How does path variable work?

0 Answers  


What is batch file programming?

0 Answers  


Write a shell program to test whether a given number is even or odd?

8 Answers  


Categories