![]() |
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 |
| Add white space to the end of a line with sed | karlanderson | Shell Programming and Scripting | 7 | 03-09-2009 06:20 AM |
| How to trim the white space around a string in C program | hxm1303 | High Level Programming | 18 | 10-17-2008 10:43 AM |
| wc of characters in a file ignoring white space | sachin.gangadha | UNIX for Dummies Questions & Answers | 1 | 12-15-2007 06:13 PM |
| How to get just the word and clean the white space? | paulofp | Shell Programming and Scripting | 2 | 06-22-2007 06:28 PM |
| How to keep white space is being deleted using read | keelba | Shell Programming and Scripting | 1 | 05-30-2002 02:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
stripping white space...
Hi All;
Having a problem with a file.. the file contains the following data... (a snapshot) 1331F9E9DB7C2BB80EAEDE3A8F043B94,AL7 1DZ,M,50 186FDF93E1303DBA217279EC3671EA91,NG5 1JU,M,24 3783FFAF602015056A8CD21104B1AAAF,CH42 4NQ,M,17 It has 3 columns sepreated by a , the second column as a space in the middle of it.. 1331F9E9DB7C2BB80EAEDE3A8F043B94,AL7 1DZ,M,50 I want to run a script against the file to strip that white space. Not really where to start. Any pointers will greatly appericated Thanks |
|
||||
|
Hi
Thanks very much for the prompt reply.. I tried running the command you gave me on command line I'm getting a few errors > awk 'BEGIN{OFS=FS=","}{ gsub(" ","",$2) }1' "user.db" awk: syntax error near line 1 awk: illegal statement near line 1 awk: syntax error near line 1 awk: bailing out near line 1 > I'm running on solaris 9. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|