![]() |
|
|
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 |
| Install additional fonts ? | vilius | AIX | 0 | 05-27-2008 01:12 AM |
| Additional book recommendations | era | I'm new to Unix. Which books should I read? | 0 | 05-18-2008 07:52 AM |
| additional interfaces in XEN environment | sap4ever | Linux | 0 | 03-03-2008 07:08 AM |
| Help with Additional Password Features | rambo15 | UNIX for Advanced & Expert Users | 1 | 07-25-2005 09:44 AM |
| Additional character output | negixx | Shell Programming and Scripting | 2 | 06-13-2005 06:18 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
sed Command - Need Additional Assistnce
Here is my data
I have a file in the format below with about 15 fields per each record. I have 2 records displayed below. "1234","Andy ","Rich ","0001","123 Main Street ","Dallas ", "1" "2345","Andrew ","Richter ","0002","234 First Ave ","Kirby ", " " My Final output needs to be as follows "1234","Andy","Rich","0001","123 Main Street","Dallas","1" "2345","Andrew","Richter","0002","234 First Ave","Kirby"," " I am using the following Sed command and it works excep it also deletes the space in the field and I need the last data element to stay like it is either a "1" or a " " (space). sed -e 's/[ ]"/"/g' inputfile>outputfile... what do I need to change in the sed command that I am using to get the result that I am looking for. The above is just the sample of the data, and it is not all data elements, there are quite a few additional fields but the last field is what I have in my data sample. Thanks |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|