#!/bin/bash -e read -s -p "DB-Passwort: " password; echo raw_proto=$(echo $password | ssh fsmi "psql -A -t -h fsmi-db fsmi -c \"select datum from protokolle where ist_veroeffentlicht='f'\"" 2> /dev/null) for proto in $raw_proto; do echo "* FSR-Protokoll vom $proto" done | tee data/uvproto.txt echo File has been written