This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\set somevar1 '\'2018-01-01\'' | |
\set somevar2 '\'2017-01-01\'' | |
\echo Starting | |
\pset fieldsep ',' | |
\pset format unaligned | |
\pset null '(null)' | |
\o 'your-output.csv' | |
-- here your query | |
select | |
field1, field2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -f | |
git branch | while read line; do | |
current=' ' | |
name=${line##\* } ## removes leading * for current | |
if [ ! "$name" = "$line" ]; then current='* '; fi | |
description=`git config branch.$name.description` | |
echo "$current" $name : $description | |
done |