F5F Stay Refreshed Software Operating Systems Show selected portion of the command output

Show selected portion of the command output

Show selected portion of the command output

T
Thesnake9
Member
160
01-05-2023, 07:36 AM
#1
1. `uptime | grep uptime -m 4` – displays the first four lines.
2. `uptime | grep load average -m 4` – shows the load averages.
3. `uptime | grep -E "up %s"` – extracts the uptime value.
4. `uptime | grep -E "load average:"` – isolates the load averages.

Each command formats the output to highlight just what you need.
T
Thesnake9
01-05-2023, 07:36 AM #1

1. `uptime | grep uptime -m 4` – displays the first four lines.
2. `uptime | grep load average -m 4` – shows the load averages.
3. `uptime | grep -E "up %s"` – extracts the uptime value.
4. `uptime | grep -E "load average:"` – isolates the load averages.

Each command formats the output to highlight just what you need.

S
SergioPW
Member
206
01-06-2023, 01:33 AM
#2
The command outputs the third column from the result.
S
SergioPW
01-06-2023, 01:33 AM #2

The command outputs the third column from the result.