0

I have lines like this:

Sun Apr 19 13:02:34 2020 us=73808 pinco.pallino/256.62.258.116:11941 [pinco.pallino] Inactivity timeout (--ping-restart), restarting

Can I use sed, or another program, to delete all characters between a / and the next space (in this case pinco.pallino)? I've tried more regex combinations but I've not found the correct one!

Thanks in advance

  • 2
    Please edit your question and show us the output you expect from this input. Your description isn't very clear. – terdon Apr 20 at 13:34
0

Replace a slash and everything following, that is not a space with empty replacement:

sed 's+/[^ ]*++g'
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.