Я создал очень простой python
скрипт, который работает в v2 и v3.
Скопируйте содержимое в filename.py и выполните sudo chmod +x filename.py
#!/usr/bin/env python
string = "update table_name set col_name = 1 where emp_id = '1234'"
x = string.split(' ')
if "update" != x[0]:
print("the first word does not contain update, exiting")
exit
else:
print("the first word contains update")
if "update" != x[1]:
print("the second word does not contain table_name, exiting")
exit
else:
print("the second word contains table_name")
if "update" != x[2]:
print("the third word does not contain set, exiting")
exit
else:
print("the third word contains set")
print("we're good to go")