Fix: egrep is obsolescent, use grep -E
See e.g., egrep(1) [https://linux.die.net/man/1/egrep]: > two variant programs egrep and fgrep are available. egrep is the same > as grep -E. fgrep is the same as grep -F. Direct invocation as either > egrep or fgrep is deprecated See also the rationale of the POSIX description of grep (https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html): > This grep has been enhanced in an upwards-compatible way to provide > the exact functionality of the historical egrep and fgrep commands as > well. It was the clear intention of the standard developers to > consolidate the three greps into a single command. Closes: #839
This commit is contained in:
@@ -214,7 +214,7 @@ class PhySim:
|
||||
mySSH.command('for pod in $(oc get pods | tail -n +2 | awk \'{print $1}\'); do oc describe pod $pod >> cmake_targets/log/physim_pods_summary.txt; done', '\$', 10)
|
||||
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/log/physim_test.txt', '.')
|
||||
try:
|
||||
listLogFiles = subprocess.check_output('egrep --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
|
||||
listLogFiles = subprocess.check_output('grep -E --colour=never "Execution Log file|Linux oai-" physim_test.txt', shell=True, universal_newlines=True)
|
||||
for line in listLogFiles.split('\n'):
|
||||
res1 = re.search('Linux (?P<pod>oai-[a-zA-Z0-9\-]+) ', str(line))
|
||||
res2 = re.search('Execution Log file = (?P<name>[a-zA-Z0-9\-\/\.\_\+]+)', str(line))
|
||||
|
||||
Reference in New Issue
Block a user