![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unable Insert data from .dat file to .xls can anybody help me | kreddy2003 | Shell Programming and Scripting | 1 | 05-28-2008 05:33 AM |
| How to insert data into MYSql database from a text file | shirleyeow | Shell Programming and Scripting | 4 | 01-11-2008 05:00 AM |
| How to insert new line in the data file using the script | Sona | UNIX for Dummies Questions & Answers | 2 | 08-22-2006 01:17 AM |
| find the position in a file and insert the data there | isingh786 | HP-UX | 5 | 04-11-2006 09:31 PM |
| how to insert data in database based on text file? | forevercalz | Shell Programming and Scripting | 9 | 12-20-2005 11:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hello,
I have 2 files. File1 has data I wrote, and File2 is a file created by an application. I would like to insert the data from File1 into File2, but it has to be inserted at a certain location on File2. I know I need to search for "</jsp-param> </jsp-descriptor>" But I don't know haw to insert data from File1 above the search criteria. File1: My Data. File2: <jsp-descriptor> <jsp-param> ..... -Insert into here </jsp-param> </jsp-descriptor> Thanks in advance, |
|
|||||
|
You can easily solve this using vi editor using buffers.
Open file1 and file2 using vi editor Code:
vi file1 file2 "m3yy ---- It will yank 3 lines to buffer called m Navigate to file2 in vi editor by doing :e file2 navigate to the place in file2 where you want paste the contents in buffer m and just do "mp There may be other methods by which you can achieve this easily. |
|
||||
|
Nevermind, figured it out.
|
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|