R
R
Roman Mirilaczvili2017-02-14 14:19:31
linux
Roman Mirilaczvili, 2017-02-14 14:19:31

How to remove single characters with sed?

How to remove all single characters from the test string "asdg sd d fgdfh mm sdf 1 2 33 a bb vaa i" using sed?
Tried like this:

echo 'asdg sd d fgdfh m m sdf 1 2 33  а бб ваа я' | sed  's/\b([\S]{1})\b//g'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2017-02-14
@2ord

echo 'asdg sd d fgdfh m m sdf 1 2 33  a bb baaaaa z' | sed -r 's/\b\S{1}\b//g'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question