Reputation: 23
Hello dear stackoverflowers,
I am writing a shell script in which I need to dump a sqlplus database content in a file, I need to have it done in one command line.
echo 'SET LINESIZE 1000; select * from myDb;'| sqlplus -S user/pass@host
But I get
SP2-0268: linesize option not a valid number
I tried without ';
' but I have the same result.
I couldn't find any example here or elsewhere on how to do this.
Any help on that?
Thanks!
Upvotes: 2
Views: 2960
Reputation: 3361
echo 'SET LINESIZE 1000\n select * from myDb;' |sed 's/\\n/\n/' |sqlplus -S user/pass@host
Upvotes: 1