E
E
eifory2018-05-30 19:03:25
bash
eifory, 2018-05-30 19:03:25

How to remove brackets from all output lines?

There is a file with the list of hosts. Using the fping command, I get the result in the form:
host1 is alive (30 ms)
host2 is alive (22 ms)
How can I remove these brackets from the output? Next, I can sort the hosts by ping time with sort -nk4.
upd: I will add an explanation: the result should be in the form host1 is alive 30 ms

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AVKor, 2018-05-30
@eifory

$ echo 'host1 is alive (30 ms)' | tr -d '()'
host1 is alive 30 ms

R
Reshh4rd, 2018-05-30
@Reshh4rd

You are apparently doing: fping -aeg
you need to: fping -ag

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question