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 does echo mean in scripting?

0 Answers  


Explain how you Automate your application using Shell scripting.

0 Answers   MAHINDRA,


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

0 Answers   Wipro,


Why are shell scripts used?

0 Answers  


How to find duplicate record in file using shell script?

0 Answers   IBM, Saama Tech, Wipro,


Is shell scripting easy to learn?

0 Answers  


Can we run shell script in windows?

0 Answers  


What does echo $0 do?

0 Answers  


What are script files?

0 Answers  


What is awk in shell script?

0 Answers  


How to find all the files modified in less than 3 days and save the record in a text file?

0 Answers  


I have 2 files and I want to print the records which are common to both.

0 Answers  


Categories