ID 포트 번호를 가져오는 명령: - & 마지막 세 문자열?

ID 포트 번호를 가져오는 명령: - & 마지막 세 문자열?

누군가가...ps -ef |와 같은 명령을 실행하여 oneliner 명령을 사용하여 차단 및 기울임꼴을 얻을 수 있도록 도와줄 수 있습니까? 자바 | grep | 컷 -d:-f20- | 컷 -d ' ' -f20 |

원하는 결과

wasadmin 15541 8868 tkin901Cell tkin901 tradeapp

관리자 15541 8868 0 3월 12일 ? 00:19:14 /a1/sys91/java/bin/java -Declipse.security -Dwas.status.socket=56259 -Dosgi.install.area=/u01/was85 -Dosgi.configuration.area= / a1/sys91/구성 파일/appsrv/servers/tradeapp/configuration -Djava.awt.headless=true -Dosgi.framework.extensions=com.ibm.cds,com.ibm.ws.eclipse.adaptors -Xshareclasses:name= webspherev85_1 .6_64_%g, 치명적이지 않은 -Dcom.ibm.xtq.processor.overrideSecureProcessing=true -Xbootclasspath/p:/a1/sys91/java/jre/lib/ibmorb.jar -classpath /a1/sys91/profiles/appsrv/properties: /a1/sys91/properties:/a1/sys91/lib/startup.jar:/a1/sys91/lib/bootstrap.jar:/a1/sys91/lib/jsf-nls.jar:/a1/sys91/lib/ lmproxy .jar:/a1 /sys91/lib/urlprotocols.jar:/a1/sys91/deploytool/itp/batchboot.jar:/a1/sys91/deploytool/itp/batch2.jar:/a1/sys91/java/lib/ 도구 .jar -Dibm. websphere.internalClassAccessMode=allow-verbose:gc -Xms1024m -Xmx1024m -Xcompressedrefs -Xscmaxaot4M -Xscmx90M -Dws.ext.dirs=/a1/sys91/java/lib:/a1/sys91/profiles/appsrv/classes:/a1/sys91 /classes:/a1/sys91/lib:/a1/sys91/installedChannels:/a1/sys91/lib/ext:/a1/sys91/web/help:/a1/sys91/deploytool/itp/plugins/com.ibm. etools.ejbdeploy/runtime -Dderby.system.home=/a1/sys91/derby -Dcom.ibm.itp.location=/a1/sys91/bin -Djava.util.logging.configureByServer=true -Duser.install.root= /a1/sys91/profiles/appsrv -Djava.ext.dirs=/a1/sys91/tivoli/tam:/a1/sys91/java/jre/lib/ext -Djavax.management.builder.initial=com.ibm.ws .management.PlatformMBeanServerBuilder -Dpython.cachedir=/a1/sys91/profiles/appsrv/temp/cachedir -Dwas.install.root=/u01/was85 -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager -Dserver.root=/a1/sys91/profiles/appsrv -Dcom.ibm.security.jgss.debug=off -Dcom.ibm.security.krb5.Krb5Debug=off -Djava.library.path=/a1/sys91/lib /native/linux/x86_64/:/a1/sys91/java/jre/lib/amd64/compressedrefs:/a1/sys91/java/jre/lib/amd64:/a1/sys91/bin:/a1/sys91/nulldllsdir: /usr/lib: -Djava.endorsed.dirs=/a1/sys91/endorsed_apis:/a1/sys91/java/jre/lib/endorsed -Djava.security.auth.login.config=/a1/sys91/profiles/appsrv /properties/wsjaas.conf -Djava.security.policy=/a1/sys91/profiles/appsrv/properties/server.policy com.ibm.wsspi.bootstrap.WSPreLauncher -nosplash -application com.ibm.ws.bootstrap.WSLauncher com .ibm.ws.runtime.WsServer /a1/sys91/profiles/appsrv/configtkin901Cell tkin901 무역 앱

답변1

데이터가 모두 한 행에 있는 것 같습니다. 그런 다음 원하는 필드에 액세스하려면 다음을 사용할 수 있습니다.

awk '{print $1,$2,$3,$(NF-2),$(NF-1),$NF}'

관련 정보