Need help interpreting this sed command

I am looking at an Oracle script I found online , but it runs the sed command to filter the results from the trace file, I run Oracle on the Windows server, so the sed command is not recognized.

host sed -n '/scattered/s/.*p3=//p' &Trace_Name | sort -n | tail -1

I tried reading the online documentation , but I still don't know how to interpret what this command is trying to filter. Will anyone be so kind as to help me understand what this command is trying to filter? Or even better, I can run from the Windows command line to achieve the same result.

Thank!

+3
source share
4 answers

: " , " ", , " p3 = " ( , ) " (-n , , ).

:

abc organized p3=123
def scattered p3=456
ghi ordered p3=789

:

456
+5

sed , . "-n" , . "P" , , .

sort -n .

tail -1 .

, , , .

, "p3 =". s/from/to/" .

+2

sed cygwin, unix- Windows.

+1

To solve another part of your question, the unxutils project migrates many GNU utilities to Win32, including sed. Find out more .

+1
source

Source: https://habr.com/ru/post/1731452/


All Articles