0

So I want to include in a shell script a sqlplus command, the problem is that one of the parameters could be a double quote char (") but sqlplus thinks is the start of a string.

This is the command:

sqlplus username/ @file.sql " /home/myuser/Desktop/

I already enclosed them in: single quote, double single quote, double quote, double double quote. Also tried to escape the char using \ but nothing works.

The most I'm getting is that it waits me to close the 'string' or the following error:

string beginning "" /home/my..." missing terminating quote (").
Jordan Cortes
  • 271
  • 1
  • 2
  • 16

1 Answers1

1

This does the trick

sqlplus username/ @file.sql "'\"'" /home/myuser/Desktop/

Useful resources at:

UNIX Shell Quotes - a simple tutorial

Expansion of variable inside single quotes in a command in bash shell script

Community
  • 1
  • 1
Jordan Cortes
  • 271
  • 1
  • 2
  • 16