双引号作为 SQLPLUS 中的参数
Double quote as parameter in SQLPLUS
所以我想在 shell 脚本中包含一个 sqlplus 命令,问题是其中一个参数可能是双引号 char (") 但 sqlplus 认为它是字符串的开头。
这是命令:
sqlplus username/ @file.sql " /home/myuser/Desktop/
我已经将它们括在:单引号、双单引号、双引号、双双引号中。还尝试使用 \
转义字符,但没有任何效果。
我得到的最多的是它等待我关闭 'string' 或以下错误:
string beginning "" /home/my..." missing terminating quote (").
这样就可以了
sqlplus username/ @file.sql "'\"'" /home/myuser/Desktop/
有用的资源位于:
UNIX Shell Quotes - a simple tutorial
Expansion of variable inside single quotes in a command in bash shell script
所以我想在 shell 脚本中包含一个 sqlplus 命令,问题是其中一个参数可能是双引号 char (") 但 sqlplus 认为它是字符串的开头。
这是命令:
sqlplus username/ @file.sql " /home/myuser/Desktop/
我已经将它们括在:单引号、双单引号、双引号、双双引号中。还尝试使用 \
转义字符,但没有任何效果。
我得到的最多的是它等待我关闭 'string' 或以下错误:
string beginning "" /home/my..." missing terminating quote (").
这样就可以了
sqlplus username/ @file.sql "'\"'" /home/myuser/Desktop/
有用的资源位于:
UNIX Shell Quotes - a simple tutorial
Expansion of variable inside single quotes in a command in bash shell script