The UNIX and Linux Forums  

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




Thread: Trim issue
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-28-2008
scorpio scorpio is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 41
Trim issue

Hi All,

I am using trim in my code..

ID_SA_SOURCE="`echo "$data" | cut -c17-34 | tr -s " "`"
ID_SA_DEST="`echo "$data" | cut -c35-52 | tr -s " "`"
echo"$ID_SA_SOURCE";"$ID_SA_DEST";

the output is

0608166896; 3001339; contains one whitespace between the two ..how can i remove that single white space ?

Thnks