![]() |
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 |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
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 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 |
| sed, insert data from a file to another? | ctcuser | Shell Programming and Scripting | 4 | 05-03-2005 01:43 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
hi,
am new to unix can any one help me to insert data to afile to a specified column. ie to an output file with csv format i should insert some data to 2,3,4 fileds and the data in those fields should move to next fields eg: output file asd,12,12,12,12,1,2,1,1,1,1,1 mnmn,1,12,1,1,1,112,12,1,1,1 insert data after asd 33,44 after mnmn 55,66 ie required o/p asd,33,44,12,12,12,12,1,2,1,1,1,1,1 mnmn,55,66,1,12,1,1,1,112,12,1,1,1 |
|
||||
|
hi
i am getting an error as below insert: line 1: syntax error near unexpected token `(' insert: line 1: `nawk -F, -v OFS=',' -v asd = '33,44' -v mnmn = '55,66' '$1 == "asd" || $1 == "mnmn" '$1 == "asd" || $1 == "mnmn" { $1= $1 OFS (( $1 == asd ) ? asd : mnmn )}1' myFile.txt' |
|
||||
|
Quote:
i mean, if u have 10 rows in the file u want to change, u want to insert data into all the 10 rows n in a sequential manner? |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|