Jay Taylor's notes
back to listing indexsqlite - Avoid message "-- Loading resources from .sqliterc" - Stack Overflow
[web search]-
Home
-
- Public
- Questions
-
Tags
-
Users
-
Companies
-
Collectives
- Explore Collectives
-
-init
specifies the file to load instead of~/.sqliterc
.<(echo)
uses Process Substitution to provide a path to a temporary empty file.-
@user1461607 And /dev/fd/63 is empty, so your ~/.sqliterc is not loaded. Oct 19, 2021 at 9:18
- The week's top questions and answers
- Important community announcements
- Questions that need answers
-
Is it against the law to sell Bitcoin at a flea market?
-
Can't understand 16th notes connected by beams
-
How should we do boxplots with small samples?
-
Alternatives to rim tape
-
hydrostatic equilibrium of Gas planets
-
When adding a new disk to RAID 1, why does it sync unused space?
-
What date is 74029 on an IBM Mainframe?
-
Scientific writing: attributing actions to inanimate objects
-
Scientifically plausible way to sink a landmass
-
Is moderated livestock grazing an effective countermeasure for desertification?
-
How should I deal with coworkers not respecting my blocking off time in my calendar for work?
-
What purpose are these openings on the roof?
-
Why does the capacitance value of an MLCC (capacitor) increase after heating?
-
How to help my players track gold in multiple currencies?
-
Children's CGI show about flying around on an airship with sky islands
-
What is the meaning of 说得过?
-
Is Vigenere's cipher really breakable for very long cipher keys?
-
A thought experiment about neutrinos
-
Is It possible to determine whether the given finitely presented group is residually finite with MAGMA or GAP?
-
Did Sauron suspect that the Ring would be destroyed?
-
Can anyone Identify the make, model and year of this car?
-
Should I remove older low level jobs/education from my CV at this point?
-
Was 36-bits needed for LISP?
-
Super Mario 64 RNG
Minor problem, nevertheless irritating : Is there a way to avoid the following message from appearing each time I make a query :
-- Loading resources from /Users/ThG/.sqliterc
As a stupid workaround, this works:
<. sqlite your_sqlite.db 'select * from your_table'
This is because the current code does this:
if( stdin_is_interactive ){ utf8_printf(stderr,"-- Loading resources from %sn",sqliterc); }
Forcing a stdin redirect thwarts this due to this piece of code:
stdin_is_interactive = isatty(0);
This works as well:
sqlite -batch your_sqlite.db 'select * from your_table'
due to this piece of code:
}else if( strcmp(z,"-batch")==0 ){ /* Need to check for batch mode here to so we can avoid printing ** informational messages (like from process_sqliterc) before ** we do the actual processing of arguments later in a second pass. */ stdin_is_interactive = 0; }
but it's longer, so kind of defeats the purpose.
answered Sep 27, 2018 at 19:59Unlike some other answers, this not only solves the problem, but respects the fact that some of us do like to have an.sqliterc
for a reason, instead of assuming "bah who works in a shell anyway" Sep 8, 2020 at 7:46I know that this question is PRETTY old now, but simply deleting '/Users/ThG/.sqliterc' should solve the problem. '.sqliterc' is a configuration file for sqlite's interactive command line front-end. If you don't spend a lot of time in there, you won't miss the file.
answered Sep 23, 2011 at 21:26Thank you for the answer. In fact, I use the command line front-end. I suppose this means I shall have to put up with it...– ThGSep 24, 2011 at 9:47That resource msg comes out on stderr, and it's followed by a blank line, so you could get rid of it with something like this (wrapped up in a script file of its own):
#!/bin/bash sqlite3 -init /your/init/file /your/sqlite3/file.db " your SQL cmds " 2>/dev/null | sed -e1d
answered Mar 8, 2014 at 14:13A bit late but @levant pied almost had the solution, you need to pass an additional -interactive to silence the --loading resources from.
$ sqlite3 -batch -interactive SQLite version 3.31.1 2020-01-27 19:55:54 Enter ".help" for usage hints. sqlite> .q
answered Feb 3, 2020 at 5:08You can simply rename your config file to disable the warning. And revert the rename to keep the configuration after use.
I use the following:
#suppress default configuration warnings mv $HOME/.sqliterc $HOME/.backup.sqliterc # sqlite3 scripts... #revert mv $HOME/.backup.sqliterc $HOME/.sqliterc
answered Aug 23, 2019 at 16:31When using sqlite in shell scripts, you usually don't event want your
~/.sqliterc
to be loaded at all. This works well for me:sqlite3 -init <(echo)
Explanation:
answered Feb 4, 2021 at 11:55This does not work, now I see a-- Loading resources from /dev/fd/63
. Aug 4, 2021 at 11:25This post is hidden. It was deleted 10 years ago by the post author.sqlite3 will load
~/.sqliterc
, if it exists!If you don't want it, just rm it.
rm /Users/ThG/.sqliterc
If you find yourself keep typing
sqlite3 -header -column xxx.db
.You can put those dot-options in
~/.sqliterc
to save some typing:.header on .mode column
answered May 7, 2011 at 5:47Love this site?Get the weekly newsletter! In it, you'll get:
see an example newsletter
Related
Hot Network Questions