1. 调用shell脚本时候注意:
If there is a name collision between a parameter and a variable, the parameter will take precedence.
If there is a name collision with a parameter or argument, variables will defer.
传参给shell的时候形如“2088-08-08 08:08:08”要注意加上(单或双)引号(如: xx.sh hehe '${date1}',否则空变量“ ”将被视为参数间的分隔符),除非传过去之前不是string二十date型。
否则date1参数也会被拆开成2088-08-08和08:08:08两个参数;
If there is a name collision between a parameter and a variable, the parameter will take precedence.
If there is a name collision with a parameter or argument, variables will defer.
传参给shell的时候形如“2088-08-08 08:08:08”要注意加上(单或双)引号(如: xx.sh hehe '${date1}',否则空变量“ ”将被视为参数间的分隔符),除非传过去之前不是string二十date型。
否则date1参数也会被拆开成2088-08-08和08:08:08两个参数;