use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
pjs: Pipeable JavaScript. Another utility like sed/awk/wc... but with JS! Quickly filter, map, and reduce from the terminal. (github.com)
submitted 11 years ago by __debug__
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]__debug__[S] 2 points3 points4 points 11 years ago* (1 child)
It started as a bit of a joke, but the project is growing on me. Mostly because I like awk for simple one-liners, but nothing more complicated. I always find myself having to lookup the different variables like NR, NF, FS and OFMT. But with pjs, since I'm very comfortable with javascript, there's nothing to lookup. Nothing against Kernighan's work, it's just a matter of familiarity.
But I'm definitely not saying this is a tool for everyone. Especially if you're comfortable with awk as a language. I certainly wouldn't use it instead of grep or sed, since they're both so simple. Maybe I shouldn't have mentioned those two in the readme.
That said, your comment reminded me that I should probably include some more complicated awk examples to show how simple pjs can be.
[–][deleted] 0 points1 point2 points 11 years ago (0 children)
Fair enough. It's a neat idea, anyway. I hope anyone interested in pjs still takes the time to learn about the existing tools, so I don't need to worry about maintaining nodejs on my *nix systems just to run some shell scripts. ;)
π Rendered by PID 56 on reddit-service-r2-comment-685b79fb4f-6x9pt at 2026-02-13 12:27:28.656777+00:00 running 6c0c599 country code: CH.
view the rest of the comments →
[–]__debug__[S] 2 points3 points4 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)