: Grep Load Averages I'm trying to grep all load averages & put them in an array. What should be the exact way, keeping in mind the followings requirements. Defining Array: LA= ("one" "five"
I'm trying to grep all load averages & put them in an array.
What should be the exact way, keeping in mind the followings requirements.
Defining Array:
LA= ("one" "five" "fifteen")
LA= (`(uptime | grep -o '[0-9]+.[0-9]+*')`)
But this command gives output like this;
3.08
3.49
3.61
Requirement:
1. There should be no linebreaks so the averages are separated with spaces and get fit in array syntax.
Values only before the decimals are sent to output or array variables..
Please if someone can help me achieve it..
More posts by @Harper822
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.