fumoFileText=$(find fumo | grep -i .gif) fumoFileNumbers=$(wc -l <<< "$fumoFileText") echo "$fumoFileNumbers" > "fumoFile"