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

Shell support #61

Open
matz3ibm opened this issue Feb 5, 2018 · 1 comment
Open

Shell support #61

matz3ibm opened this issue Feb 5, 2018 · 1 comment

Comments

@matz3ibm
Copy link

matz3ibm commented Feb 5, 2018

Hi Scott,

probably not found the right workaround or command yet, but the Operations team and I were looking on how to switch to shell mode from jsqsh, eg. for doing some researching in hdfs, run some scripts or ETL jobs. In the \help I found:
"2> go | grep test | more"
.... but would like to have something like

\sh to invoke a "configurable shell"
to execute bash, ksh, sh, probably with cmd line as parameter- similar to vi ":sh" command.

Using this with the jsqsh alias command with an additional template mechanism would be very practible:
\alias listdnodes @@cluster@@='\sh ./opt/IBM/tools/listnodes.pl -s=dnodes -c @@cluster@@'

(I think there is a little error on the alias wiki page, "pre-argumented commands": https://github.com/scgray/jsqsh/wiki/alias in example: 1> \alias '\prod'='\connect -U sa -S prod-db -d mssql-jtds' ==> then it's called with "1>\prod", or? - but would tat not be improvable like 1> \alias '\env:@@env@@'='\connect -U sa -S @@env@@ -d mssql-jtds' ===> called "1>\env:prod-db"

regards from Frankfurt,
Matthias

@scgray
Copy link
Owner

scgray commented Feb 5, 2018

Yes, you are right that the documentation for \alias has a bug in it. It should have just been \prod not \prod-db in the example. I'll fix that.

A command to execute an arbitrary binary should be relatively easy. I'll see if I can take a look at it over the weekend.

I hope all is well!

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