字符串看起来像
str1= "the value of var1=test, the value of var2=testing, the final value of var3=testing1"
Run Code Online (Sandbox Code Playgroud)
到目前为止,我通过 IFS=',' 分割了字符串
IFS="," read -r -a final <<< "$str1"
Run Code Online (Sandbox Code Playgroud)
然后给变量赋值
var1="${final[0]#"var1="}"
Run Code Online (Sandbox Code Playgroud)
如何使用正则表达式以最短的方式分配变量值?
预期输出
var1=test
var2=testing
var3=testing1
Run Code Online (Sandbox Code Playgroud) 查询结果
Select SYSDATE from DUAL
Run Code Online (Sandbox Code Playgroud)
是
19-JUL-19
Run Code Online (Sandbox Code Playgroud)
如何在like命令中传递此日期以提取今天日期的所有元组
桌子看起来像这样
ID MSG_TYPE CollectionDate
515587 GenOut 21-FEB-19 04.09.57.325772000 PM
515588 GenOut 19-JUL-19 01.06.15.307068000 PM
515589 GenOut 22-AUG-18 03.20.15.307069290 PM
515590 GenOut 19-JUL-19 12.03.09.873288000 PM
Run Code Online (Sandbox Code Playgroud)
预期结果
ID MSG_TYPE CollectionDate
515588 GenOut 19-JUL-19 01.06.15.307068000 PM
515590 GenOut 19-JUL-19 12.03.09.873288000 PM
Run Code Online (Sandbox Code Playgroud)