Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Calling perl from zsh w/ vars

by hippo (Bishop)
on Jul 18, 2020 at 11:33 UTC ( [id://11119487]=note: print w/replies, xml ) Need Help??


in reply to Calling perl from zsh w/ vars

Not a Perl solution, but you can simply unquote the var:

ACTION_PATTERN='perl$' ROWS=$(perl -n -e '$count++ if /'$ACTION_PATTERN'/; END { print $count + }' ~/.zsh_history) echo "ROWS:${ROWS}"

Caveat: only tested in bash. I'd be surprised if it didn't work in zsh too, though.

Replies are listed 'Best First'.
Re^2: Calling perl from zsh w/ vars
by k-man (Novice) on Jul 22, 2020 at 11:04 UTC

    Indeed, thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119487]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-04-19 07:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found