Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on LiteCLI – A user-friendly command-line client for SQLite database. Parent comment
It does work, but only sort of. Just did:
$ sqlite3 -init select_contact.sql test_sqlite.db
-- Loading resources from select_contact.sql
Alan|Acre|50|Male|100.0
Betty|Smith|20|Female|200.0
Charlie|Copenhagen|30|Male|400.0
Dorothy|Delhi|80|Female|400.0
Edwin|Bombay|40|Male|100.0
Edwin|Pune|55|Female|110.0
SQLite version 3.8.11 2015-07-27 13:49:41
Enter ".help" for usage hints.
sqlite>
where select_contact.sql contains "select * from contact;"
So it can run a script given as a parameter.
But it leaves you in the CLI instead of cleanly exiting. And prints those extra headers, etc. Not very Unix-philosophy-adherent, it seems.
Edit: formatting
There are no comments on this comment yet.
It does work, but only sort of. Just did:
$ sqlite3 -init select_contact.sql test_sqlite.db
-- Loading resources from select_contact.sql
Alan|Acre|50|Male|100.0
Betty|Smith|20|Female|200.0
Charlie|Copenhagen|30|Male|400.0
Dorothy|Delhi|80|Female|400.0
Edwin|Bombay|40|Male|100.0
Edwin|Pune|55|Female|110.0
SQLite version 3.8.11 2015-07-27 13:49:41
Enter ".help" for usage hints.
sqlite>
where select_contact.sql contains "select * from contact;"
So it can run a script given as a parameter.
But it leaves you in the CLI instead of cleanly exiting. And prints those extra headers, etc. Not very Unix-philosophy-adherent, it seems.
Edit: formatting