pipes which output to dev null so when which fails it doesn't print out an error
parent
2bf0a7672b
commit
812385ab1f
|
|
@ -19,7 +19,7 @@ function printmotd(){
|
|||
if [[ -f $GOPATH/bin/fortune ]]; then
|
||||
echo ""
|
||||
$GOPATH/bin/fortune -file="$GOPATH/bin/fortunes.txt"
|
||||
elif [[ -f $(which fortune) ]]; then
|
||||
elif [[ -f $(which fortune 2>/dev/null) ]]; then
|
||||
echo ""
|
||||
fortune
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue