Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gor query vs gor #7

Open
Shicheng-Guo opened this issue May 8, 2020 · 1 comment
Open

gor query vs gor #7

Shicheng-Guo opened this issue May 8, 2020 · 1 comment

Comments

@Shicheng-Guo
Copy link

Shicheng-Guo commented May 8, 2020

Share 3 commands which I used to practice gor.

gor query /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | head
gor query /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10
gor /home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10

For the above 3 commands, only the first one works well and the following 2 don’t work. Do you have some comments or suggestion?

gor-comet-Shicheng-Guo-2020

Here is the gor I used:

(base) [sguo2@comet-ln2 gor]$ gor
GOR Command Line

Usage:

gor [-v] [COMMAND]

Description:

Command line interface for gor query language and processes.

Options:

  -v, --version   Print version information and exits.

Commands:

  query, q    Execute a gor query, script or template
  help, h     Gives help on gor commands and functions.
  manager, m  Gor table manager operations.
  index, i    Index gor data files
  cache, c    Cache management
  render, r   Render reports and scripts
  info        List general gor information

(c) WuxiNextcode 2019

@gmagnu
Copy link
Contributor

gmagnu commented Jul 14, 2020

You need to put quotes ("") around your query, otherwise the | is interpreted by the shell and the command that follows is a shell command. The error message you are getting are from the shell that does not under stand the 'top' command. The first case works as head is a valid shell command. The second two cases should have been:

gor query "/home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10"
gor "/home/sguo2/janssen4/oasis/bin/gor/tests/data/gor/dbsnp_test.gor | top 10"

Note: that if no command follows gor it defaults to query

The first use case shows how you can mix gor and shell commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants