WAS pmt.sh 執行後無任何反應
ENV:
Centos Stream 9
WAS v8.5.5.18
Problem:
pmt.sh 執行後無任何反應, 並未如預期起動
A.txt
+++ begin A.txt +++
ABC/123/xyz
DEF/456/uvw
+++ end A.txt +++
Would like to get the last column: ( / as the delimiter)
expect output:
xyz
uvw
Method 1:
awk -F"/" '{print $NF} A.txt
Method 2:
rev A.txt|cut -d '/' -f 1|rev
Method 3:
grep -o '[^/]*$' A.txt
Method 4:
perl -pe 's/(.*)\/(.*)$/$2/' A.txt
ref:
https://stackoverflow.com/questions/22727107/how-to-find-the-last-field-using-cut

python script:import time import threading def worker(): while True: time.sleep(1000) threads = [] num_worker_threads = 19000 for i in range(num_worker_threads): t = threading.Thread(target=worker) try: t.start() threads.append(t) print(i) except: print("EX") time.sleep(2000) for t in threads: t.join()
DEFINE QL(MYQ) CLUSTER(CLUS1)
setmqaut -m QM1 -t queue -n MYQ -g dev_group +putamqsput MYQ QM1
setmqaut -m QM1 -t rqmname -n QM2 -g dev_group +putamqsput MYQ QM1 8208 0 QM2
Security: ClusterQueueAccessControl=RQMName
grep -o -E ".*[0-9]{2}:[0-9]{2}:[0-9]{2}\ [A,P]{,1}[M]{,1}[:space:]{,1}|AMQ[0-9]{4}:.*" AMQERR01.LOG|sed '$!N;s/\n/\ /'
-o: only print the match string
*** AIX 上的opensoure grep 要用[[:space:]]
N means read the next line (可用來合併二行)
$!N means read the next line unless it is the last line (最後一行不做)
Filesystem:ValidateAuth=No
How to pass an argument to mq process script (or run it background in unix)
Example:
If we would like define a process which invokes the "luke.sh" script
and would like also passes the argument "lightsaber" to luke.
=== process definition ===
DEFINE PROCESS(P1) +
DESCR ('MQ test process script') +
APPLTYPE(UNIX) +
APPLICID('/tmp/luke.sh') +
USERDATA(' ') +
ENVRDATA('lightsaber')
=== process definition ===
You must put the argument in the 'ENVRDATA' but not 'USERDATA'.
*** tip:
You can also put "&" in the ENVRDATA for the UNIX script running in the background.
DEFINE PROCESS
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ref.adm.doc/q085670_.htm
****On UNIX systems, ENVRDATA can be set to the ampersand character (&) to make the
started application run in the background.
SSL:AllowTLSV1=NO