Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-27 Thread Sean McAfee
On Mon, May 26, 2025 at 6:50 AM Richard Hainsworth wrote: > My understanding is that there is a default test so that '.' and '..' > are not returned. So if :test is not specified thats the behaviour you get. > The page I linked to earlier doesn't read that way to me at all: Returns a lazy list

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-26 Thread Richard Hainsworth
On 26/05/2025 12:13, Elizabeth Mattijsen wrote: On 26 May 2025, at 00:34, Sean McAfee wrote: On Sun, May 25, 2025 at 12:32 PM Sean McAfee wrote: I'll have to play around with your code a bit. Normally I would use `.dir(test => /:i \.pdf / )` to pull out PDF files. Oh yeah, that's a bit bett

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-26 Thread Elizabeth Mattijsen
> On 26 May 2025, at 00:34, Sean McAfee wrote: > > On Sun, May 25, 2025 at 12:32 PM Sean McAfee wrote: > I'll have to play around with your code a bit. Normally I would use > `.dir(test => /:i \.pdf / )` to pull out PDF files. > > Oh yeah, that's a bit better. I'm not as familiar with the p

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-25 Thread Sean McAfee
On Sun, May 25, 2025 at 12:32 PM Sean McAfee wrote: > I'll have to play around with your code a bit. Normally I would use >> `.dir(test => /:i \.pdf / )` to pull out PDF files. >> > > Oh yeah, that's a bit better. I'm not as familiar with the path API as I > could be. > ...Huh. I was just mes

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-25 Thread Sean McAfee
On Sat, May 24, 2025 at 2:31 AM William Michels wrote: > Thanks, Sean! > > Do any of the various `PDF` modules work to solve your page-counting quest? > My task was just a one-off, so I didn't look. If I were working on a more permanent program, I'd try to reduce external dependencies in that w

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-24 Thread Clifton Wood
My previous message should read ".say for" instead of "say for". Sorry On Sat, May 24, 2025 at 6:28 AM Clifton Wood wrote: > Just for fun, here's a similar one-liner using File::Find and PDF::Class: > > # Formatted for clarity; > use File::Find; > use PDF::Class; . > say for find( dir => ".", na

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-24 Thread Clifton Wood
Just for fun, here's a similar one-liner using File::Find and PDF::Class: # Formatted for clarity; use File::Find; use PDF::Class; . say for find( dir => ".", name => *.ends-with(".pdf") ).map( sub ($_) { CATCH { default { return 0 } }; say "Checking { .absolute }..."; PDF::Class.ope

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-24 Thread William Michels via perl6-users
Thanks, Sean! Do any of the various `PDF` modules work to solve your page-counting quest? I'll have to play around with your code a bit. Normally I would use `.dir(test => /:i \.pdf / )` to pull out PDF files. The closest U&L answer posted for your issue might be: https://unix.stackexchange.c

Re: Raku one-liners posted on Unix & Linux StackExchange

2025-05-21 Thread Sean McAfee
On Tue, May 20, 2025 at 12:51 PM William Michels via perl6-users < perl6-us...@perl.org> wrote: > If you haven't visited U&L StackExchange, you should! It's much less > 'siloed' than StackOverflow in that an OP might post a question requesting > a bash/sed/awk answer, but other answers are readily

Raku one-liners posted on Unix & Linux StackExchange

2025-05-20 Thread William Michels via perl6-users
Okay, tooting my own horn here: this past week I posted my 600th Unix & Linux StackExchange answer written in Raku: https://unix.stackexchange.com/search?q=user%3A227738+Raku Most of these answers are tagged "text-processing" (471 answers), while 122 answers mention the words "Raku" and "Unic