added coreutils + bash solution for problem 1

This commit is contained in:
ikselven 2017-07-04 00:12:57 +02:00
parent 3a5f81545d
commit c83ec18a1e

11
1/euler001.bash Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
declare -i sum=0
for i in {1..999}; do
{
echo $i | grep -E "*[05]$" || factor $i | grep -P "\d+:(\s\d)*(\s[35])(\s\d*)*$";
} > /dev/null && sum=$(( $sum + $i ))
done
echo "$sum"