Execute the n1ql file with parameter from the cbq shell command


#1

Hello,
i execute this command unix
/opt/couchbase/bin/cbq -e 127.0.0.1:8091 -u user -p pass --f /home/couch/pruebas_script/selectVersion.n1ql;

the file selectVersion.n1ql; contains this n1ql

select b1
FROM Bucket1 b1
WHERE b1.version = $1
;

how can i pass the parameter $1 in the command?


#2
In the file you can  add the following line before select
\SET -args [6];

Checkout https://github.com/couchbase/query/tree/master/shell/cbq/examples