The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-11-2008
ShawnMilo ShawnMilo is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 252
To strip off the last character:

echo "1.39," | perl -pe 's/.$//'

Output: 1.39



If you only want to strip off a comma and ignore anything else, replace the period in that regex with a comma.

ShawnMilo