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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenate only digits from a line of text 2

Status
Not open for further replies.

pdtak

Technical User
Feb 25, 2008
63
US
How do you contenate numeric value from a line of text?
I need to store just the numbers into a valiable.
#!/bin/ksh
LINE="time_last_login=1220039866"
TIME=<<concatenated value after the "=">>
...
echo $TIME
1220039866

Thank you in advance.
 
man cut

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
got it!
echo $LINE | cut -f "2" -d =

Thanks PHV!
 
Thanks to everyone's help, I now have a good idea how I can include it in my script.
Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top