Linux Learning
Search This Blog
Tuesday, June 22, 2010
How to trim variable in linux.
if MACHINE_NAME=
ABCDF
use following simple commands to trim it.
# echo $(echo $MACHINE_NAME)
This will cause MACHINE_NAME to contain ABCDF without any white spaces in either left or right sides.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment