control-m

Display exact matches only with GREP

落爺英雄遲暮 提交于 2019-12-18 15:29:22
问题 How can I display all jobs that ended OK only? When I try the command below, it shows both OK and NOTOK since both have "OK" ctmpsm -listall application | grep OK 回答1: You need a more specific expression. Try grep " OK$" or grep "[0-9]* OK" . You want to choose a pattern that matches what you want, but won't match what you don't want. That pattern will depend upon what your whole file contents might look like. You can also do: grep -w "OK" which will only match a whole word "OK", such as "1

Can we capture log if we run a job from powershell

半腔热情 提交于 2019-12-13 05:15:06
问题 Can we capture logs if we run a job from power shell . As we are trying to run a control-m job from windows servers 2008 and its getting failed so we tried to run it from power shell . Is there any way to capture logs as job is failing in power shell also ? 回答1: You could use Start-Transcript for logging the actions/output of a script. You need to make sure the user running the script has write access to the output location. Start-Transcript -Path 'C:\path\to\transcript.log' -Append #

Display exact matches only with GREP

时光怂恿深爱的人放手 提交于 2019-11-30 13:09:10
How can I display all jobs that ended OK only? When I try the command below, it shows both OK and NOTOK since both have "OK" ctmpsm -listall application | grep OK You need a more specific expression. Try grep " OK$" or grep "[0-9]* OK" . You want to choose a pattern that matches what you want, but won't match what you don't want. That pattern will depend upon what your whole file contents might look like. You can also do: grep -w "OK" which will only match a whole word "OK", such as "1 OK" but won't match "1OK" or "OKFINE". $ cat test.txt | grep -w "OK" 1 OK 2 OK 4 OK This may work for you