<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/tags/pipe</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Fri, 24 May 2013 18:02:21 GMT</pubDate>
<item>
<title>(HTML) Reduce height of pipes in a horizontal menu - hotdiggity</title>
<link>http://snipplr.com/view/59572/reduce-height-of-pipes-in-a-horizontal-menu/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 09 Oct 2011 11:55:11 GMT</pubDate>
<guid>http://snipplr.com/view/59572/reduce-height-of-pipes-in-a-horizontal-menu/</guid>
</item>
<item>
<title>(DOS Batch) Split output of dir command into parts - bits</title>
<link>http://snipplr.com/view/48725/split-output-of-dir-command-into-parts/</link>
<description><![CDATA[ <p>This example shows how you can split the output lines of e.g. a dir command. It also shows how to use a pipe to reduce the resulting lines by the findstr command.
Explanation:
This command calls "dir *.dll" and filters the results by findstr command through a pipe "|". The result of this is a list of all dll-files which contains the string "text" in it's name.
Now the for-loop takes each of these lines and splits them by the signs given in the "delims=.: " part. The "tokens=1,2,3" will send the first three parts of the split string to the explicit defined variable %i and the implicit defined variables %j and %k.
You can start counting your variables from every sign between a-z or A-Z. You will get more information about this on your command line with "for /?".

If you want to use this in a batch file, replace all % with %%.

This example will give you the date of alle found files in the format DD MM JJJJ (on a german windows box). If you use mor than three tokens or other characters as delims, you can get different results. Just play around.</p> ]]></description>
<pubDate>Thu, 10 Feb 2011 10:10:31 GMT</pubDate>
<guid>http://snipplr.com/view/48725/split-output-of-dir-command-into-parts/</guid>
</item>
<item>
<title>(Bash) find and grep piped - edeustace</title>
<link>http://snipplr.com/view/40161/find-and-grep-piped/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 09 Sep 2010 00:37:02 GMT</pubDate>
<guid>http://snipplr.com/view/40161/find-and-grep-piped/</guid>
</item>
<item>
<title>(Bash) Howto run Tidy from the command line - noah</title>
<link>http://snipplr.com/view/27758/howto-run-tidy-from-the-command-line/</link>
<description><![CDATA[ <p>This shell command will retrieve a Web page and validate the HTML with [Tidy, the HTML linter from the W3](http://tidy.sourceforge.net/).  You can get an **XHTML validation** report right in your shell prompt, just like you'd get from the [Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/249) or the [Web service.](validator.w3.org/).  It's especially helpful when you need to **validate HTML on your intranet, or behind a firewall.**

### **NOTE: Curl does not follow redirects by default!**

By default, Curl retrieves *exactly* the URL you specify. The `-L` option causes Curl to follow redirects just like a Web browser would.

### **NOTE: Tidy produces a lot of output!**


Windows users should make sure their [command prompt screen buffer height is set to 9999](http://www.codinghorror.com/blog/archives/000334.html 'command prompt tips from Coding Horror') so that you don't "lose" any output.


### **Explanation of the command line options**

`curl -L` tells Curl to fo**LL**ow HTTP redirects

`curl -s` **S**uppresses Curl's annoying progress bar

`tidy -e` tells Tidy not to **E**mit the tidied HTML to the console

`tidy -q` tells Tidy to be **Q**uiet, instead of printing extra crap at the bottom of the report

### **Dependencies**

Curl and Tidy are installed via the [Cygwin setup.exe](http://cygwin.com/)

Alternately, Perl hackers could use [lwp-request](http://search.cpan.org/~gaas/libwww-perl-5.808/bin/lwp-request).

### **Doing more**

[Validate HTML with a stricter algorithm,](http://snipplr.com/view/4130/check-linked-pages-for-tidy-validation-errors-on-the-command-line/) using the OpenJade SGML parser.

[Validate linked pages](http://snipplr.com/view/4130/check-linked-pages-for-tidy-validation-errors-on-the-command-line/) with Tidy and lwp-request.</p> ]]></description>
<pubDate>Fri, 05 Feb 2010 12:41:54 GMT</pubDate>
<guid>http://snipplr.com/view/27758/howto-run-tidy-from-the-command-line/</guid>
</item>
<item>
<title>(Java) Convert OutputSream into an InputStream - dvdsmnt</title>
<link>http://snipplr.com/view/23134/convert-outputsream-into-an-inputstream/</link>
<description><![CDATA[ <p>There are many ways to retrieve data written to an `OutputStream` in an `InputStream` class. An introduction can be found at [io-tools website](http://code.google.com/p/io-tools/wiki/ConvertOutputStreamInputStream) :

# InputStreamFromOutputStream #

This is the hardest way, but it offers some advantages:

 * This class internally use pipes, so it has a fixed memory fingerprint (doesn't fill up your memory with data).
 * Details of threads are hidden from the user. You don't have to deal with instantiation/start/synchronization/stop.
 * You can easily choose between many options for instantiating new Threads (thread pool, thread per instance ...) or just don't care and get the default.
 * Details of pipes are hidden. No PipeInputStream or PipeOutputStream in your code.
 * The internal pipe size can be adjusted to fit your needs.</p> ]]></description>
<pubDate>Sat, 14 Nov 2009 19:06:57 GMT</pubDate>
<guid>http://snipplr.com/view/23134/convert-outputsream-into-an-inputstream/</guid>
</item>
<item>
<title>(SVN) Just print SVN log message bodies - noah</title>
<link>http://snipplr.com/view/10791/just-print-svn-log-message-bodies/</link>
<description><![CDATA[ <p>Gets the SVN log and prints out just the log messages, without any metadata.  Exposes the narrative aspect of software workflow, allows the actors to recede into the background a bit.</p> ]]></description>
<pubDate>Wed, 31 Dec 2008 13:56:14 GMT</pubDate>
<guid>http://snipplr.com/view/10791/just-print-svn-log-message-bodies/</guid>
</item>
<item>
<title>(Bash) Delicious ego boost from the command line - noah</title>
<link>http://snipplr.com/view/9964/delicious-ego-boost-from-the-command-line/</link>
<description><![CDATA[ <p>This one-liner counts how many of the links to onemorebug.com there are on http://delicous.com/tag/noahsussman.

Basically it prints a number, and that number is the percentage of the top 100 links for that tag in delicious that point to your URL. 

Requires Grep, Lynx and Wc.</p> ]]></description>
<pubDate>Fri, 21 Nov 2008 22:29:39 GMT</pubDate>
<guid>http://snipplr.com/view/9964/delicious-ego-boost-from-the-command-line/</guid>
</item>
<item>
<title>(Bash) Validate a list of Web pages with Tidy, on the command line - noah</title>
<link>http://snipplr.com/view/4129/validate-a-list-of-web-pages-with-tidy-on-the-command-line/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 13 Nov 2007 22:54:37 GMT</pubDate>
<guid>http://snipplr.com/view/4129/validate-a-list-of-web-pages-with-tidy-on-the-command-line/</guid>
</item>
<item>
<title>(Bash) Download linked JPEGs from a Web page, on the command line - noah</title>
<link>http://snipplr.com/view/4063/download-linked-jpegs-from-a-web-page-on-the-command-line/</link>
<description><![CDATA[ <p>The following command will download all the files with a JPG extension that are linked from http://flickr.com.

_Requires the LWP and HTML::Tree Perl modules.  You must also have Wget installed on your system for this to work._</p> ]]></description>
<pubDate>Fri, 02 Nov 2007 22:57:45 GMT</pubDate>
<guid>http://snipplr.com/view/4063/download-linked-jpegs-from-a-web-page-on-the-command-line/</guid>
</item>
<item>
<title>(Bash) kill processes by regex - plexus</title>
<link>http://snipplr.com/view/1419/kill-processes-by-regex/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 17 Oct 2006 13:25:50 GMT</pubDate>
<guid>http://snipplr.com/view/1419/kill-processes-by-regex/</guid>
</item>
<item>
<title>(Perl) How to determine if the output is screen or pipe. - kkindoh</title>
<link>http://snipplr.com/view/276/how-to-determine-if-the-output-is-screen-or-pipe/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 08 Jul 2006 11:27:25 GMT</pubDate>
<guid>http://snipplr.com/view/276/how-to-determine-if-the-output-is-screen-or-pipe/</guid>
</item>
</channel>
</rss>