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

Redirect output includes prompts and errors #35

Open
irrelevantdotcom opened this issue May 7, 2020 · 2 comments
Open

Redirect output includes prompts and errors #35

irrelevantdotcom opened this issue May 7, 2020 · 2 comments

Comments

@irrelevantdotcom
Copy link

irrelevantdotcom commented May 7, 2020

When piping output to a file
db2struct -h host -u user -p -t whatever... >> ~/test.go
any errors messages, and the "Password:" prompt, are also sent to the file, the latter causing an apparent freeze unless you realise and press something!

You can use -p <password> on the command line which helps but does not solve the underlying issue.

Otherwise, thanks for writing this - it has saved me a heck of a lot of typing!!! Feature request - option to specify "all tables" or a list of them.

@Shelnutt2
Copy link
Owner

@irrelevantdotcom you can use the --target to write the struct output to a file.

For the all tables request, would you want all the structs in a single file or one file per struct with the name of the file the snake case version of the struct name?

@irrelevantdotcom
Copy link
Author

Ah, I han't spotted that option. Ta!
Both output options have their benefits .... in my case I started off appending all to one file, but ended up writing them to separate files, (which I then ran through a touch of PHP to adjust things.)

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