Forum Stats

  • 3,758,196 Users
  • 2,251,352 Discussions
  • 7,870,106 Comments

Discussions

Piping multiple commands to SQLcl (18.2)

user5317405
user5317405 Member Posts: 9
edited Aug 7, 2018 10:04AM in SQLcl

Hi.

Is it possible to pass and execute multiple commands (pipe) from Windows cmd to sqlcl like it is possible in SqlPlus:

For example:

(echo prompt 1 & echo prompt 2) | sqlplus /nolog

returns:

SQL>1

SQL>2

while:

(echo prompt 1 & echo prompt 2) | sql /nolog

returns only:

SQL>1

It would be really nice if I could do sth like:

(echo format rules ${rulesPath} & echo format file ${file} ${file}) | "${sqlPath}" /nolog

Thanks for help.

user5317405

Answers