sed '
/^2017-05-29/!d;
/INFO/d;
/WARN/d;
s/ /INFO/;
s/ /INFO/;
s/ .*//;
s/INFO.*INFO/ /;
' /var/log/somefile \
|tail -n5
"... compile a set of commands into a single program and run that." <html class=nojs>
<p>This website was designed for browsers that run Javascript. Are you using one? Here are some examples of browsers that work well with our website: browser1, browser2, etc. Alternatively, a no-JS version of the website is available <a href=https://blockstack-site-api.herokuapp.com/v1/blog-rss>here</a>.</p>
</html>
There are of course other ways to do this. The point is that it can be done and is not difficult. curl -o 1.htm https://blockstack-site-api.herokuapp.com/v1/blog-rss
tr -cd '\12\40-\176' < 1.htm > 2.htm
xyz 2.htm
where xyz is some program that displays html or rss. curl -o 1.htm https://www.wsj.com/amp/articles/the-quants-run-wall-street-now-1495389108
sed -n '/./{/<title/,/<\/title/p;/<p>/,/<\/p>/p;}' 1.htm > 2.htm
FWIW, 2.htm has no amp elements, no Javascript, no images, no ads, no externally sourced resources and therefore no tracking. sed -n '
/./{/div class=.image/,/<\/div/!d;s/ *//;}
/src=/{s///;s/\"//g;s/.*/<a Href=&>&<\/a><br>/;}
/alt=/{s///;s/[\">]//g;/./s/.*/<P>above: &<\/p>/;}
/Href=/p;/<P>/p' 1.htm >> 2.htm fetch -4o 0.htm https://www.wsj.com/amp/articles/robots-arent-destroying-enough-jobs-1494434982 while ( putchar( getchar( ) ) != '\0' )
In the shell maybe it is better to test each "expression" on a line by itself. Or maybe not. I do this anyway. variable=$(command1 $(command2));
This could be alternatively expressed as something like variable1=$(command2);
# can now test variable1 before proceeding to next line
variable2=$(command1 $variable1);
The result of nesting is subshells and complexity that I am not sure reluctant, occasional shell scripters are prepared to think about.
All you have to do is substitute tab for space.
Ctrl-V then tab. Or if using GNU sed just type \t.
We can reject this simplicity as a "trick" and demand something more complex.
But that suggests that the goal is not to solve the problem, it is to satisfy someone's desire for having some underlying complexity that moves the solution out of the realm of "trivial".