Re:We spent $20 to achieve RCE and accidentally became the a...
by mjevans on Wednesday September 11, 2024 @03:34PM
(#41514612)
SELECT COUNT( DISTINCT source ) FROM queries ORDER BY source ASC
-- COUNT ( DISTINCT ... ) ~= uniq | wc -l ;; sort without -u is this busybox? ORDER BY col ASC
-- wait this doesn't need sort and uniq if it's just being counted...
SELECT COUNT( DISTINCT source ) FROM queries
Re:We spent $20 to achieve RCE and accidentally became the a...
by Woovie on Wednesday September 11, 2024 @04:09PM
(#41514937)
bash nerds vs sql nerds I guess, these people are bash nerds
Re:We spent $20 to achieve RCE and accidentally became the a...
by SSLy on Wednesday September 11, 2024 @02:41PM
(#41514116)
beats up re-re-remembering how to do it in sql
Re:We spent $20 to achieve RCE and accidentally became the a...
by radicality on Wednesday September 11, 2024 @02:59PM
(#41514279)
And probably because for quick things like that you’re already working in a “pipeline”, where you first want to see some of the results so you output with SQLite, and then add more to the pipeline. Similarly, I often do ‘cat file | grep abc’ instead of just grep, might be probably out of habit.
Re:We spent $20 to achieve RCE and accidentally became the a...
by mr_mitm on Thursday September 12, 2024 @03:30AM
(#41518390)
I found that this is actually a good use case for LLMs. You can probably paste that one liner up there and ask it to create the corresponding SQL query.
Re:We spent $20 to achieve RCE and accidentally became the a...
by SSLy on Thursday September 12, 2024 @04:03AM
(#41518584)
yeah, they're good for cursed tools like that, ffmpeg, excel macros, etc etc
Re:We spent $20 to achieve RCE and accidentally became the a...
by lilyball on Wednesday September 11, 2024 @05:38PM
(#41515571)
yeah, they could have done `sqlite …|sort -u|wc -l` instead and saved themselves a process invocation!
Re:We spent $20 to achieve RCE and accidentally became the a...
by silisili on Wednesday September 11, 2024 @07:42PM
(#41516280)
Hey now if you're just gonna count lines no need to sort it at all.
Oh cool they saved the logs in a database ! Wait... |sort|uniq|wc -l ?? But why ?