I'm trying to get an output to echo on the next line in a given color and outputted next to a label.
Sorry if that's a bit vague, see below.
#!/bin/bash
YELLOW=$(tput setaf 3 && tput bold)
echo -n 'plaintext' | openssl md2 || read hash
echo "$YELLOW Hash:$hash"
But I can't seem to get the 'read hash' section to be part of the pipe and am getting this:
:~/Desktop# ./test.sh
f2bc5b1d869870d7688f71b2d87030bd #No color??
Hash: #Where I want the coulored hash.