Advertisement

08.31.2006 at 08:41AM PDT, ID: 21974156
[x]
Attachment Details

ksh on Sun-Trim all leading spaces from a record

Asked by rayskelton in Unix Systems Programming

Tags: trim, ksh, spaces, leading

I am using the following command to filter out all " characters from a record and would like to do something simular by filtering any leading spaces in a record. In most cases the space will not exist but sometimes will be present. I have done this before but can not get it correct.

Filters " characters from record  
classification=`echo "$classification"|sed -e 's/"//g'`
Start Free Trial
[+][-]08.31.2006 at 11:53AM PDT, ID: 17431521

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 12:35PM PDT, ID: 17431886

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 01:40PM PDT, ID: 17432384

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.31.2006 at 02:28PM PDT, ID: 17432719

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Unix Systems Programming
Tags: trim, ksh, spaces, leading
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 3
Solution Grade: A
 
 
[+][-]09.01.2006 at 11:12AM PDT, ID: 17438830

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32