jpalardy / command-line-one-liner-challenges Goto Github PK
View Code? Open in Web Editor NEWA series of challenges for people who love command-line one-liners.
A series of challenges for people who love command-line one-liners.
The solution's comment for problem 013 Text Highlight makes a remark about the grep
solution inserting extra escape sequences, but the current expected also has ^[[0m^[[K
at the end of every highlighted line. This makes a seemingly-valid solution that highlights only the
invalid.
$ cat -v expected.txt
CHAPTER II
SATURDAY morning was come, and all ^[[1;31mthe^[[0m summer world was bright and^[[0m^[[K
fresh, and brimming with life. There was a song in every heart; and if
^[[1;31mthe^[[0m heart was young ^[[1;31mthe^[[0m music issued at ^[[1;31mthe^[[0m lips. There was cheer in^[[0m^[[K
every face and a spring in every step. The locust-trees were in bloom
and ^[[1;31mthe^[[0m fragrance of ^[[1;31mthe^[[0m blossoms filled ^[[1;31mthe^[[0m air. Cardiff Hill, beyond^[[0m^[[K
^[[1;31mthe^[[0m village and above it, was green with vegetation and it lay just far^[[0m^[[K
enough away to seem a Delectable Land, dreamy, reposeful, and inviting.
Tom appeared on ^[[1;31mthe^[[0m sidewalk with a bucket of whitewash and a^[[0m^[[K
long-handled brush. He surveyed ^[[1;31mthe^[[0m fence, and all gladness left him and^[[0m^[[K
a deep melancholy settled down upon his spirit. Thirty yards of board
fence nine feet high. Life to him seemed hollow, and existence but a
burden. Sighing, he dipped his brush and passed it along ^[[1;31mthe^[[0m topmost^[[0m^[[K
plank; repeated ^[[1;31mthe^[[0m operation; did it again; compared ^[[1;31mthe^[[0m insignificant^[[0m^[[K
whitewashed streak with ^[[1;31mthe^[[0m far-reaching continent of unwhitewashed^[[0m^[[K
fence, and sat down on a tree-box discouraged. Jim came skipping out at
^[[1;31mthe^[[0m gate with a tin pail, and singing Buffalo Gals. Bringing water from^[[0m^[[K
^[[1;31mthe^[[0m town pump had always been hateful work in Tom's eyes, before, but^[[0m^[[K
now it did not strike him so. He remembered that there was company at
^[[1;31mthe^[[0m pump. White, mulatto, and negro boys and girls were always there^[[0m^[[K
waiting their turns, resting, trading playthings, quarrelling,
fighting, skylarking. And he remembered that although ^[[1;31mthe^[[0m pump was only^[[0m^[[K
a hundred and fifty yards off, Jim never got back with a bucket of
water under an hour--and even then somebody generally had to go after
him. Tom said:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.