Simpliest way is to make a script file like this ---- mleval.xsh import module ml=marklogic MLCONNECT="xcc://your connect string" ml:query "$1" -------------
Then from a command line you can run xmlsh mleval "1+1" Also note that xmlsh itself is a "command line" so you can run it interactively and type the commands one by one. If you would like more help contact me offline and I can setup a gotomeeting or webex to step you through. -David ( [email protected]) ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected] Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com<http://www.marklogic.com/> From: [email protected] [mailto:[email protected]] On Behalf Of Geert Josten Sent: Friday, April 19, 2013 9:51 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] command line interface How would you call it to evaluate a query that you pass from command-line? xmlsh -e "1+1"? ;-) Van: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] Namens David Lee Verzonden: vrijdag 19 april 2013 15:47 Aan: MarkLogic Developer Discussion Onderwerp: Re: [MarkLogic Dev General] command line interface xmlsh works great from the command line ----------------------------------------------------------------------------- David Lee Lead Engineer MarkLogic Corporation [email protected]<mailto:[email protected]> Phone: +1 812-482-5224 Cell: +1 812-630-7622 www.marklogic.com<http://www.marklogic.com/> From: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] On Behalf Of Geert Josten Sent: Friday, April 19, 2013 9:45 AM To: MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] command line interface Hi Gary, I am not aware of a tool that allows directly typing a query on the command-line itself, but http://developer.marklogic.com/code mentions xmlsh and cqsh. Perhaps one of those could do that? Or perhaps you could write a script for those that take a command-line param and pass it to MarkLogic for evaluation.. Kind regards, Geert Van: [email protected]<mailto:[email protected]> [mailto:[email protected]<mailto:[email protected]>] Namens Gary Larsen Verzonden: vrijdag 19 april 2013 15:44 Aan: General MarkLogic Developer Discussion Onderwerp: [MarkLogic Dev General] command line interface Hi, Is there a command line interface for Windows to execute a query? XQRunner looked like a possibility but could not locate any examples on how this works. Thanks, Gary
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
