文字数据:
java.net.PlainSocketImpl.socketAccept;java.net.PlainSocketImpl.accept;java.net.ServerSocket.implAccept;java.net.ServerSocket.accept;sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop;sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run;java.lang.Thread.run 40
sun.misc.Unsafe.park;java.util.concurrent.locks.LockSupport.parkNanos;java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos;java.util.concurrent.DelayQueue.take;java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take;java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take;java.util.concurrent.ThreadPoolExecutor.getTask;java.util.concurrent.ThreadPoolExecutor$Worker.run;java.lang.Thread.run 20
java.lang.Object.wait;sun.misc.GC$Daemon.run 20
java.lang.Object.wait;java.lang.ref.ReferenceQueue.remove;sun.rmi.transport.DGCClient$EndpointEntry$RenewCleanThread.run;java.lang.Thread.run 20
java.lang.Object.wait;java.lang.ref.ReferenceQueue.remove;java.lang.ref.ReferenceQueue.remove;sun.rmi.transport.ObjectTable$Reaper.run;java.lang.Thread.run 20
java.lang.Object.wait;java.lang.ref.ReferenceQueue.remove;java.lang.ref.ReferenceQueue.remove;java.lang.ref.Finalizer$FinalizerThread.run 20
java.lang.Object.wait;java.lang.Object.wait;java.lang.ref.Reference$ReferenceHandler.run 20
java.lang.Object.wait;com.intellij.execution.rmi.RemoteServer.start;org.jetbrains.idea.maven.server.RemoteMavenServer.main 20
sun.misc.Unsafe.park;java.util.concurrent.locks.LockSupport.parkNanos;java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill;java.util.concurrent.SynchronousQueue$TransferStack.transfer;java.util.concurrent.SynchronousQueue.poll;java.util.concurrent.ThreadPoolExecutor.getTask;java.util.concurrent.ThreadPoolExecutor$Worker.run;java.lang.Thread.run 15
java.net.SocketInputStream.socketRead0;java.net.SocketInputStream.read;java.io.BufferedInputStream.fill;java.io.BufferedInputStream.read;java.io.FilterInputStream.read;sun.rmi.transport.tcp.TCPTransport.handleMessages;sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0;sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run;java.util.concurrent.ThreadPoolExecutor$Worker.runTask;java.util.concurrent.ThreadPoolExecutor$Worker.run;java.lang.Thread.run 4
例如第一行
java.lang.Thread.run;sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run;sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop;java.net.ServerSocket.accept;java.net.ServerSocket.implAccept;java.net.PlainSocketImpl.accept;java.net.PlainSocketImpl.socketAccept 40
如何将文件格式化为示例第一行?
答案 0 :(得分:0)
您可以使用awk
来获取您喜欢的字段。这里有一些可以帮助你入门。
awk -F"[; .]" -v OFS=. 'NR==1 {print $29,$30,$31,$32";"$17,$18,$19,$20,$21}'
java.lang.Thread.run;sun.rmi.transport.tcp.TCPTransport$AcceptLoop