![]() |
![]() |
#23 | |
Undefined
"The unspeakable one"
Jun 2006
My evil lair
22·19·79 Posts |
![]() Quote:
But, OMG, you are correct: Code:
~ echo -n "hi" | wc -l 0 ![]() |
|
![]() |
![]() |
![]() |
#24 | |
Aug 2020
37 Posts |
![]() Quote:
Code:
2020-06-17 14:55:50 gfx906-0 worktodo.txt : line "PRP=320AC8B64330ED58CBAB02B3947C8D59,1,2,104980517,-1,77,0" does not end with a newline2020-06-17 14:55:50 gfx906-0 Exiting because "lines must end with newline" 2020-06-17 14:55:50 gfx906-0 waiting for background GCDs.. 2020-06-17 14:55:50 gfx906-0 Bye |
|
![]() |
![]() |
![]() |
#25 |
Aug 2020
3710 Posts |
![]()
The above case was a standalone instance of gpuowl. In case the pool option is used, the program does not to exit but seems to look for a 'worktodo.txt' in the local directory. It found an old one (from before using the pool option) and started with an exponent which apparently had expired and its result submitted.
Code:
2020-10-21 21:15:09 Rig-RadeonVII-01 worktodo.txt line ignored: "" 2020-10-21 21:15:09 Rig-RadeonVII-01 108980089 FFT: 6M 1K:12:256 (17.32 bpw) 2020-10-21 21:15:09 Rig-RadeonVII-01 Expected maximum carry32: 2E340000 2020-10-21 21:15:10 Rig-RadeonVII-01 OpenCL args "-DEXP=108980089u -DWIDTH=1024u -DSMALL_HEIGHT=256u -DMIDDLE=12u -DPM1=0 -DAMDGPU=1 -DWEIGHT_STEP_MINUS_1=0x9.99a4967011bap-4 -DIWEIGHT_STEP_MINUS_1=-0xc.00089583deaa8p-5 -cl-unsafe-math-optimizations -cl-std=CL2.0 -cl-finite-math-only " 2020-10-21 21:15:10 Rig-RadeonVII-01 ASM compilation failed, retrying compilation using NO_ASM 2020-10-21 21:15:12 Rig-RadeonVII-01 OpenCL compilation in 2.08 s 2020-10-21 21:15:13 Rig-RadeonVII-01 108980089 OK 0 loaded: blockSize 400, 0000000000000003 |
![]() |
![]() |
![]() |
#26 |
Dec 2012
The Netherlands
1,583 Posts |
![]() |
![]() |
![]() |
![]() |
#27 | |
Undefined
"The unspeakable one"
Jun 2006
My evil lair
177416 Posts |
![]() Quote:
"A" has zero lines according to wc, and "B" has zero lines according to wc. But both of those have 1 line each. If I concatenate them then "AB" also has 1 line, it isn't zero lines. Why should I care about m+n? I only care about the final result, not the parts that make it up. How many lines are in the following text? I am one line. |
|
![]() |
![]() |
![]() |
#28 |
Feb 2005
Colorado
3·193 Posts |
![]()
Depends on if there is a newline at the end.
![]() I like the behavior. As long as you realize the behavior is there, it makes wc more versatile. For example, in this case Preda could use it to determine whether a text file uses newlines or not, then add them if necessary. |
![]() |
![]() |
![]() |
#29 |
Undefined
"The unspeakable one"
Jun 2006
My evil lair
22×19×79 Posts |
![]()
My conversation with wc:
Me: Hey wc, how many lines were returned from this command? wc: Zero Me: So the output was nothing? wc: No. I said there are zero lines. Me: How can there be no lines, but still have something there? wc: Because I said so, that's why. Me: So if I write out this one line on a piece of paper and ask you to count the lines what will you say? wc: There are zero lines. Me: I hate you! |
![]() |
![]() |
![]() |
#30 |
"Mike"
Aug 2002
794510 Posts |
![]() |
![]() |
![]() |
![]() |
#31 | |
"TF79LL86GIMPS96gpu17"
Mar 2017
US midwest
13×373 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#32 |
Undefined
"The unspeakable one"
Jun 2006
My evil lair
22×19×79 Posts |
![]()
wc can go jump in a lake. grep has it correct:
Code:
~ echo -n "hi" | grep -c "" 1 |
![]() |
![]() |
![]() |
#33 |
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2
59·157 Posts |
wc -l doesn't count "lines", it counts line breaks. If there are none, it will return 0.
If you take a short binary file then it will also likely have 0 'lines' (so one can assume that was what wc's author thought a good thing.) If you wc -l on a "mac-produced" text file you will typically get a 0. (because mac uses \r for a line break.) |
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Errors | kriesel | kriesel | 4 | 2019-05-21 20:51 |
Prime95 errors ( 29.4 v8) under Win 10 x64 | pepi37 | Software | 0 | 2018-11-29 08:17 |
ERRORS | Unregistered | Information & Answers | 2 | 2013-04-01 04:14 |
Prime 95 errors | Wychi | Hardware | 9 | 2004-10-09 16:01 |
heat and errors | crash893 | Hardware | 37 | 2002-11-12 16:33 |