I'm trying to count the number of HDD's on my linux system, I have put together the following line.

```
findhdds=$(find /sys/block -name 'sd*' | wc -l)

```

Now it seems to work when just running 'find /sys/block -name 'sd\*' | wc -l' but when trying to store it in a variable I get the following message when reading it back:

```
3: command not found

```

Anyone understand where I have gone wrong?