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

cpc.sh: let: k=: syntax error: operand expected (error token is "=") #17

Closed
ydroneaud opened this issue Oct 13, 2021 · 3 comments
Closed

Comments

@ydroneaud
Copy link

I have this shell error during cpc.sh run:

IHV1   = {1215776608,3027357254,3082882766,2558746435}
IHV2   = {1215776608,1785367902,3602992650,3078856319}
dIHV   = {0,3052977944,520109884,520109884}
Dv     = [!-2,6,-8,14,-24,29!]
Dw     = [!-2,-5,15,-19,-24,-27,29,31!]
Blocks = 7

Msg1   = 67668767 0 36963072 36988025 3405438513 1373522928 1120441926 3501858414 187668621 2896542893 205808995 2544529963 431569900 0 2152653763 2184428680
Msg2   = 63347730 1464670714 3426110770 2460932572 1773031144 3361261166 1956379989 3196392674 327350835 3799722998 1392645548 4167497084 3254959121 0 1901183133 1132634811
Thread 7 exited.          
Thread Thread 14 exited.          
Thread Thread 13 exited.          
Thread Thread 32 exited.          
Thread Thread 2321Thread  exited.          Thread Thread 
16Thread Thread 22Thread Thread 17Thread 5Thread  exited.          Thread 20Thread  exited.          Thread  exited.          Thread Thread Thread 25Thread 28Thread  exited.          
3019Thread 26Thread 9318 exited.          24 exited.           exited.          Thread 

 exited.           exited.          
Thread 314 exited.           exited.          
 exited.          
 exited.          
27 exited.          

Thread 29 exited.          

15 exited.          
6 exited.          
2 exited.          

 exited.          
12 exited.          
1 exited.          
 exited.          

 exited.          
11 exited.          
 exited.          


Thread 8 exited.          
10 exited.          
Work: 2^(40.4489), Coll.: 60635(uf=30252,nuf=30380,?=0,q=0,rh=3), Blocks: 7

Waiting for threads to finish...done.
Runtime: 680.605
[*] Birthday search completed.
./scripts/cpc.sh: ligne 168: let: k= : erreur de syntaxe : opérande attendu (le symbole erroné est « = »)
[*] Number of backtracks until now: 0
[*] Time before backtrack: 1800 s
[*] Starting step 0

It's in french, it's should translate to "let: k=: syntax error: operand expected (error token is "=")"

This happen because $3 is empty.

@cr-marcstevens
Copy link
Owner

This script has been used many times as is, without the third parameter.
I'm not sure why the script completely fails in your case.
Even if $3 is empty and the let k=$3 errors, then still $k should be empty and the next lines should set it to 0.
Can you give a bit more info on linux distro & shell used?

A workaround in your case would be to pass 0 as 3rd parameter.

@ydroneaud
Copy link
Author

It doesn't fail hopefully. Just report this error then keep going assuming k is 0.
I'm using Ubuntu 21.04 (hirsute), with bash 5.1.4(1)-release

@cr-marcstevens
Copy link
Owner

Ok, good to hear it actually does continue as it should. But error message should be fixed now as well.

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

No branches or pull requests

2 participants