I have a bunch of files with lines that look like this

```
 54 apples
  7 oranges
  1 bananas

```

I'd like to get probabilities of each of these. That is, I want to have the following: 

```
 0.87 apples
 0.11 oranges
 0.02 bananas

```

I can easily awk for a sum for each file individually

```
awk '{sum += $1} END {print sum}' input.txt

```

But I'm wondering how to compute probabilities.