Unix [SOLVED]: Sed command with regular expression and replace

Unix [SOLVED]: Sed command with regular expression and replace

Home Forums Unix Unix [SOLVED]: Sed command with regular expression and replace

Tagged: , , ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37019

    Anonymous

    QuestionQuestion

    I am new to sed command and regular expressions.

    Could anyone help me to explain the below command

     echo "FIXTEST_XYZ             23040/tcp       # 127.0.0.1:23040" | sed -n 's/^FIXTEST_([A-Za-z0-9]+)s+([0-9]+)/tcps+#s*([A-Za-z0-9.]+):([0-9]+)s*/1 2 3 4/p'
    

    Thank you for your help !!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.