The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Remove Spaces
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 04-23-2009
devtakh devtakh is offline
Registered User
  
 

Join Date: Oct 2007
Location: Bangalore
Posts: 514
Quote:
Originally Posted by javeed7 View Post
Hi devtakh,

Thanks for your quick reply.
But, the number of columns may differ from file to file.
I mean to say that the number of columns are not constant.
Could anyone please suggest any other way!!!

Thanks
awk -F "," 'OFS=","{first=$1;gsub(/ /,"",$0);$1=first;print $0}'


cheers,
Devaraj Takhellambam