3 ms·
> while somebody comfortable is shell writes a parallelized one liner Do you have an example of this? I didn’t even know you could make sql calls in scripts.
by irrational 4y ago
> while somebody comfortable is shell writes a parallelized one liner
Do you have an example of this? I didn’t even know you could make sql calls in scripts.
- justanotherbody 4y agomysql, psql etc. let you issue sql from the command line I don't do much sql in bash scripts but I do keep some wrapper scripts that let me run queries from stdin to databases in my environment
- deleted 4y ago[deleted]
- sargstuff 4y agoWASM Gawk wrapper script in a web browser with relevant information about schema grammar / template file would allow for alternate display formats beyond cli text (aka html, latex, "database report output", cvs, etc )
- meken 4y agoI don’t have an example, but this article comes to mind and you may be able to find an example in it https://adamdrake.com/command-line-tools-can-be-235x-faster-than-your-hadoop-cluster.html https://adamdrake.com/command-line-tools-can-be-235x-faster-...
- crucialfelix 4y agoPSQL="psql postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$DATABASE_HOST:$DATABASE_PORT/$POSTGRES_DB -t -P pager=off -c " OLD="CURRENT_DATE - INTERVAL '5 years'" $PSQL "SELECT id from apt WHERE apt.created_on > $OLD order by apt.created_on asc;" | while read -r id; do if [[ $id != "" ]]; then printf "\n\*\* Do something in the loop with id where newer than \"$OLD\" \*\*\*\n" # ... fi done