question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a way to run commands from a file

See original GitHub issue

sqlcmd provides a :r meta-command to run commands from a file in the current session. psql spells it \i. Does this feature exist in mssql-cli? I tried both :r and (for the heck of it) \i to no avail, though the latter did pop up a tantalizing file browser. 🤔

$ mssql-cli -d foo
Version: 0.8.0
Mail: sqlcli@microsoft.com
Home: http://github.com/dbcli/mssql-cli
foo>:r bar.sql
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ':'.

screen shot 2018-01-11 at 9 54 55 am

$ mssql-cli -d foo
Version: 0.8.0
Mail: sqlcli@microsoft.com
Home: http://github.com/dbcli/mssql-cli
foo>\i foo.sql
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '\'.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:29
  • Comments:19 (4 by maintainers)

github_iconTop GitHub Comments

15reactions
lycoviancommented, May 16, 2018

I was curious as to the status of being able to pipe or run script files. Also +1 as it would solve a important developer CI/CD use case for us.

11reactions
pensivebriancommented, Jan 11, 2018

Hello, @whit537. Currently, mssql-cli does not support running command from a file. However, adding support for this is on our roadmap, though I don’t have any exact timelines. If I had to guess, this is two, maybe three months out. Thanks for the feedback! Issues like this, along with upvotes, help prioritize our work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Solved] How to run commands from a file inside a C# program
I would add this to your answer - You can invoke csc.exe like this System.Diagnostics.Process.Start(@"path_to_csc_compiler\csc.exe " + ...
Read more >
How to add custom commands/programs to run from windows ...
I just want a method to create a custom command that can be run from the address bar of the file explorer, and...
Read more >
Executing Shell Commands with Python - Stack Abuse
The first thing we do in our Python file is import the os module, which contains the system function that can execute shell...
Read more >
Dockerfile reference - Docker Documentation
This page describes the commands you can use in a Dockerfile . ... Parser directives do not add layers to the build, and...
Read more >
Ask Question
You need to add the ./ to run commands from scripts in the local directory, because commands that do not contain / in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found