Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Left trim and Right trim

Status
Not open for further replies.

Johnathon

Programmer
Jul 29, 2006
23
US
Hi,
Anyone know how how to perform left trim and right trim on the string variable in unix script?

Thank you,
Johnathon
 
a=" zzz "
a=`echo $a |sed s/" "//g`
When the var has no space in it. Gregor.Weertman@mailcity.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top