Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed updateTorDB.sh #558

Merged
merged 1 commit into from
Aug 23, 2024
Merged

fixed updateTorDB.sh #558

merged 1 commit into from
Aug 23, 2024

Conversation

Takalele
Copy link
Contributor

Hi,

The script was only able to download data for one month using ./updateTorDB.sh 1. Any attempt to specify a higher value failed because the backward counting mechanism was broken. The issue was due to a missing -1 in the sequence loop. It needed to be changed from:
$(seq $n 0)
to
$(seq $n -1 0)

BR
Takalele

backwards counting was broken, now fixed, it just missed a -1
from
$(seq $n 0)
to
$(seq $n -1 0)
Copy link
Owner

@phaag phaag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like, this is more of an issue of the command seq on your system. On all my test systems, this works perfectly well, as seq automatically decreases by 1.
What OS/version are you using?

@Takalele
Copy link
Contributor Author

I initially thought the same, but after testing it on newer and very old linux distributions — where they all exhibited the same behavior without -1 it didn’t work.

tested distros:
centos 6.10 - seq (GNU coreutils) 8.4
ubuntu 20.04 - seq (GNU coreutils) 8.30
ubuntu 22.04 - seq (GNU coreutils) 8.32
ubuntu 24.04 - seq (GNU coreutils) 9.4
rockylinux 9.4 - seq (GNU coreutils) 8.32

Copy link
Owner

@phaag phaag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some Linuxes don't catch this.

@phaag phaag merged commit 341575a into phaag:master Aug 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants