Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# != 0 ]
- then
- echo "Please don't enter arguments"
- exit
- else
- echo "Reading integers from file"
- exec < /home/niksko/inFile
- ans=1
- while read line
- do
- ans=$(($line * $ans))
- done
- echo $ans
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement