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

Error: unrecognized token: "".read" #35983

Closed
olderone opened this issue Dec 5, 2019 · 1 comment
Closed

Error: unrecognized token: "".read" #35983

olderone opened this issue Dec 5, 2019 · 1 comment

Comments

@olderone
Copy link

olderone commented Dec 5, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13.3 windows/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

Windows

go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\ma\AppData\Local\go-build
set GOENV=C:\Users\ma\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=F:\wp\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\ma\soft\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\ma\soft\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\ma\AppData\Local\Temp\go-build601014506=/tmp/go-build -gno-record-gcc-switches

What did you do?

newDbName = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root\\test.db"
path = "C:\\Users\\ma\\Desktop\\sqlite3\\malformed\\root"
dmt := fmt.Sprintf("/c %s&cd %s&sqlite3.exe %s \".read tmp.sql\"", path[0:2], path, newDbName)
cmd := exec.Command("cmd.exe", dmt)
out1, err := cmd.CombinedOutput()
if err != nil{
	fmt.Println(err)
}

What did you expect to see?

make a new db file,
C:\Users\ma\Desktop\sqlite3\malformed\root\test.db

What did you see instead?

Error: unrecognized token: "".read"

@agnivade
Copy link
Contributor

agnivade commented Dec 5, 2019

Please kindly refrain from posting multiple duplicate issues.

Have a look at these links to ask you question:

Thanks

@agnivade agnivade closed this as completed Dec 5, 2019
@golang golang locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants