trdsql install
Install
For Linux/Windows/macOS, Download.
It is made in Go
and has no other dependent libraries, so it can be deployed and executed immediately.
Docker
If Docker is available, you can also run it with Docker. You can also use docker pull from Docker Hub, so please pull as follows.
docker pull noborus/trdsql
Mount and use the input file location. Since the result is output to the standard output, it can be received by redirection as it is.
When executing for test.csv in the current directory, it will be as follows.
docker run --rm -it -v $(pwd):$(pwd) --workdir $(pwd) noborus/trdsql "SELECT * FROM test.csv" > test_new.csv
Homebrew
You can install it with:
brew tap noborus/trdsql
brew install trdsql
go get
If you have a go build environment, you can build it yourself.
go get -u -d github.com/noborus/trdsql
cd trdsql
make
If you are cross-compiling, be aware that go-sqlite3 uses cgo.
Execution
Execute from the terminal.
trdsql [OPTIONS] [SQL command]
The SQL command specifies a database table, but you can simply specify a file instead of a table.