torque
torque copied to clipboard
Syntax error: invalid arithmetic operator
When running the last line shows:
./torque: line 38: �@4: 3.01: syntax error: invalid arithmetic operator (error token is ".01")1")
Try the latest commit.
If it's still broken, send me the output of transmission-remote -l
(redact the torrent names if need be).
Just pulled the latest and tested; still get:
./torque: line 38: �7�: 3.01: syntax error: invalid arithmetic operator (error token is ".01")
$ transmission-remote -l ID Done Have ETA Up Down Ratio Status Name 1 100% 1.53 GB Done 0.0 0.0 0.0 Idle Solus-3.9999-Budgie 2 100% 1.48 GB Done 58.0 0.0 6.1 Seeding elementaryos-5.0-stable.20181016.iso Sum: 3.01 GB 58.0 0.0
Running on: CentOS Linux release 7.5.1804 (Core)
Can you do transmission-remote -l > file
and send me the contents of file
? The spaces were mangled when you copy/pasted.
I can't reproduce this at all, using out.txt
in place of transmission (faking the torrent listing).
What version of bash
are you using? bash --version
Also, what terminal emulator are you using?
GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)
Using Gnome Terminal on Ubuntu 18.04 but I am ssh into the CentOS box
It could be ssh
causing the issue. Can you confirm that it works locally?
I logged into the server, and still get the same message. Cant provide a screenshot cause its terminal, headless machine.
The problem seems to be in the last line of transmission-remote -l output (the summary). Perhaps you need to skip that line in the parsing on torque: line 38?
$ transmission-remote -l
ID Done Have ETA Up Down Ratio Status Name
1 100% 1.39 GB Done 0.0 0.0 0.0 Stopped CentOS-7-x86_64-LiveGNOME-1804
2 100% 1.79 GB Done 0.0 0.0 0.0 Stopped Fedora-Workstation-Live-x86_64-28
3 100% 2.00 GB Done 14.0 0.0 1.4 Seeding ubuntu-18.10-desktop-amd64.iso
4 100% 1.53 GB Done 0.0 0.0 0.0 Stopped Solus-3.9999-Budgie
5 100% 1.48 GB Done 0.0 0.0 0.8 Seeding elementaryos-5.0-stable.20181016.iso
6 100% 2.10 GB Done 0.0 0.0 0.0 Stopped ubuntu-mate-18.10-desktop-amd64.iso
7 100% 950.0 MB Done 0.0 0.0 0.0 Stopped CentOS-7-x86_64-Minimal-1804
8 100% 1.51 GB Done 0.0 0.0 0.0 Stopped xubuntu-18.10-desktop-amd64.iso
9 100% 1.94 GB Done 0.0 0.0 0.0 Idle linuxmint-19-cinnamon-64bit-v2.iso
10 100% 559.7 MB Done 0.0 0.0 0.0 Idle manjaro-architect-17.1.12-stable-x86_64.iso
11 100% 1.65 GB Done 0.0 0.0 0.0 Idle manjaro-i3-17.1.12-stable-x86_64.iso
Sum: 16.90 GB 14.0 0.0
The error specifically references parsing that sum of 16.90:
16.90: syntax error: invalid arithmetic operator (error token is ".90")
Its column spacing is different from the rest of the lines.
I have a similar problem:
./torque: lÃnea 25: syntax error near unexpected element `newline'
./torque: lÃnea 25: ` for((i=${k:=0};i<(j=j>${#t[@]}?${#t[@]}:j);i++));{ t_print "${t[i]/n\/a/0}";}'
bash --version
GNU bash, versión 4.3.30(1)-release (x86_64-pc-linux-gnu)