#!/bin/bash
s='test1:
test2:true
tool3:
tool4:false'
sed -n '/:./p' <<< "$s"
awk '/:./' <<< "$s"