问题: 在win下写好的shell脚本,放到Linux上测试sh -n报错如下 ORA_check.sh: line 251: syntax error: unexpected end of file 原因:dos文件传输到unix系统时,会在每行的结尾多一个^M,在vi的时候,当你用如下命令: vi dos.txt:set fileformat=unix:w就会看到这些存在于每行结尾的^M符号,这个就是产生syntax error:unexpected end of file的原因 解决方案
前提条件: 1.表的唯一索引 2.百万级数据 SQL语句: select c.* FROM ( SELECT a.logid FROM tableA a where 1 = 1 <#if phone?exists&& phone!=""> AND a.phone like "%":phone"%" </#if> ORDER BY a.create_time DESC limit :startIndex,:m