Skip to content

Instantly share code, notes, and snippets.

@jeremyj
jeremyj / Bash double IF condition
Last active August 29, 2015 14:07
Bash double IF condition
echo -n "Input: " && read IN
IN=`echo $IN`
if ! [[ $IN == "1" || $IN == "2" ]]; then
echo "NO"
exit
else
echo "SI"
fi
@jeremyj
jeremyj / sed replace newline with space
Last active August 29, 2015 14:07
sed replace newline with space
sed ':a;N;$!ba;s/\n/ /g'