running root-tail from shell script not working
I'm trying to write a simple shell script which counts the number of .torrent files in a directory, then creates an instance of root-tail where the height of the window is the same as the number of files +2 (root-tail will then display the output of my bit torrent sessions)
I managed to get it to work as I wanted it at the command line with:
$ root-tail -g 200x$num+1+600 /mnt/torrent/log/torrent.log
where $num is the height i want the window to be, but when I wrote the following script it spat out '6+1+620: No such file or directory'
num=$(ls /mnt/torrent/torrentfiles/*.torrent | wc -l)
root-tail -g 200x$num+1+620 /mnt/torrent/log/torrent.log
As this is my first attempt at shell script, I'm certain I'm just doing something stupid (hence posting this in the newbie forum and not programming or software,) and I'd really appreciate any guidance..
Thanks for your help,