Answer the question
In order to leave comments, you need to log in
How to remove all characters after the first space using BASH + sed?
There is a line contained in the variable:
24kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.722941%
How to remove everything after the first space using sed? Those. leave 24kB.
Nubian question, but there is no urine to think.
Answer the question
In order to leave comments, you need to log in
Not sed, of course, but...
echo "24kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.722941%" | awk -F' ' '{print $1;}'
Another option:echo "line with spaces" | cut -d' ' -f1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question