<?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/language/bash/tags/line</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 19 May 2013 15:14:13 GMT</pubDate>
<item>
<title>(Bash) Backup folders - kynatro</title>
<link>http://snipplr.com/view/64755/backup-folders/</link>
<description><![CDATA[ <p>Quick backup script to output all folders in a location to their own gzip files.</p> ]]></description>
<pubDate>Fri, 27 Apr 2012 03:44:25 GMT</pubDate>
<guid>http://snipplr.com/view/64755/backup-folders/</guid>
</item>
<item>
<title>(Bash) transfer files via ssh - frigga</title>
<link>http://snipplr.com/view/52740/transfer-files-via-ssh/</link>
<description><![CDATA[ <p>Command to transfer files between servers using the command line.</p> ]]></description>
<pubDate>Thu, 28 Apr 2011 19:52:56 GMT</pubDate>
<guid>http://snipplr.com/view/52740/transfer-files-via-ssh/</guid>
</item>
<item>
<title>(Bash) Command Line to Compile for Playbook using Blackberry SDK - dim</title>
<link>http://snipplr.com/view/51665/command-line-to-compile-for-playbook-using-blackberry-sdk/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 07 Apr 2011 00:03:46 GMT</pubDate>
<guid>http://snipplr.com/view/51665/command-line-to-compile-for-playbook-using-blackberry-sdk/</guid>
</item>
<item>
<title>(Bash) Rename files from command line - alassiter</title>
<link>http://snipplr.com/view/50409/rename-files-from-command-line/</link>
<description><![CDATA[ <p>A couple of snippets useful for file management. I use these to make sure I understand how many files I'm about to modify, and then rename them.</p> ]]></description>
<pubDate>Thu, 10 Mar 2011 03:04:30 GMT</pubDate>
<guid>http://snipplr.com/view/50409/rename-files-from-command-line/</guid>
</item>
<item>
<title>(Bash) Count files in a directory - alassiter</title>
<link>http://snipplr.com/view/50408/count-files-in-a-directory/</link>
<description><![CDATA[ <p>A very simple quick way to count the number of files in a directory.</p> ]]></description>
<pubDate>Thu, 10 Mar 2011 02:55:52 GMT</pubDate>
<guid>http://snipplr.com/view/50408/count-files-in-a-directory/</guid>
</item>
<item>
<title>(Bash) robotic script done notification - adkatrit</title>
<link>http://snipplr.com/view/49183/robotic-script-done-notification/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 18 Feb 2011 09:00:51 GMT</pubDate>
<guid>http://snipplr.com/view/49183/robotic-script-done-notification/</guid>
</item>
<item>
<title>(Bash) Premiestnenie semafóra v iTunes 10 - michalvalasek</title>
<link>http://snipplr.com/view/39972/premiestnenie-semafra-v-itunes-10/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Fri, 03 Sep 2010 23:52:18 GMT</pubDate>
<guid>http://snipplr.com/view/39972/premiestnenie-semafra-v-itunes-10/</guid>
</item>
<item>
<title>(Bash) add all files in a directory to svn command line - edeustace</title>
<link>http://snipplr.com/view/39230/add-all-files-in-a-directory-to-svn-command-line/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 18 Aug 2010 17:29:14 GMT</pubDate>
<guid>http://snipplr.com/view/39230/add-all-files-in-a-directory-to-svn-command-line/</guid>
</item>
<item>
<title>(Bash) Zip a directory with 7zip - reboltutorial</title>
<link>http://snipplr.com/view/32827/zip-a-directory-with-7zip/</link>
<description><![CDATA[ <p>7zip by command line</p> ]]></description>
<pubDate>Fri, 23 Apr 2010 04:23:20 GMT</pubDate>
<guid>http://snipplr.com/view/32827/zip-a-directory-with-7zip/</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>(Bash) Send email using mail command on linux - webonomic</title>
<link>http://snipplr.com/view/24239/send-email-using-mail-command-on-linux/</link>
<description><![CDATA[ <p>This command will email the contents of emailbody.txt to somebody@domain.com with the subject My subject line.</p> ]]></description>
<pubDate>Thu, 03 Dec 2009 23:56:13 GMT</pubDate>
<guid>http://snipplr.com/view/24239/send-email-using-mail-command-on-linux/</guid>
</item>
<item>
<title>(Bash) Open app from command line: OSX - dorseye</title>
<link>http://snipplr.com/view/21759/open-app-from-command-line-osx/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sat, 24 Oct 2009 16:00:25 GMT</pubDate>
<guid>http://snipplr.com/view/21759/open-app-from-command-line-osx/</guid>
</item>
<item>
<title>(Bash) commands to remove code that was added as a result of an iframe injection - gingerbeardman</title>
<link>http://snipplr.com/view/18790/commands-to-remove-code-that-was-added-as-a-result-of-an-iframe-injection/</link>
<description><![CDATA[ <p>Be sure to backup your data! Also be sure to secure whatever broken PHP allowed this to happen.

First command can be used to search for affected files.   
Second command to does search and replace on matched iframe text only.

Adjust contents of iframe to suit, here it is: statanalyze.cn

Originally from: [http://wordpress.org/support/topic/281767?replies=25#post-1184090](http://wordpress.org/support/topic/281767?replies=25#post-1184090)</p> ]]></description>
<pubDate>Mon, 24 Aug 2009 11:14:01 GMT</pubDate>
<guid>http://snipplr.com/view/18790/commands-to-remove-code-that-was-added-as-a-result-of-an-iframe-injection/</guid>
</item>
<item>
<title>(Bash) Call Web Script From Cron Job and Log Ouput - iloveitaly</title>
<link>http://snipplr.com/view/17937/call-web-script-from-cron-job-and-log-ouput/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 06 Aug 2009 00:14:48 GMT</pubDate>
<guid>http://snipplr.com/view/17937/call-web-script-from-cron-job-and-log-ouput/</guid>
</item>
<item>
<title>(Bash) Line Number File And Copy To Clipboard - iloveitaly</title>
<link>http://snipplr.com/view/17330/line-number-file-and-copy-to-clipboard/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 22 Jul 2009 10:54:33 GMT</pubDate>
<guid>http://snipplr.com/view/17330/line-number-file-and-copy-to-clipboard/</guid>
</item>
<item>
<title>(Bash) Subversion Inconsistent line ending style error message - alexaivars</title>
<link>http://snipplr.com/view/14732/subversion-inconsistent-line-ending-style-error-message/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 05 May 2009 10:35:55 GMT</pubDate>
<guid>http://snipplr.com/view/14732/subversion-inconsistent-line-ending-style-error-message/</guid>
</item>
<item>
<title>(Bash) Add a Path to ".bash_profile" - zachwood</title>
<link>http://snipplr.com/view/11325/add-a-path-to-bashprofile/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 20 Jan 2009 01:16:48 GMT</pubDate>
<guid>http://snipplr.com/view/11325/add-a-path-to-bashprofile/</guid>
</item>
<item>
<title>(Bash) Dump a file to the terminal, starting at some line number - noah</title>
<link>http://snipplr.com/view/7309/dump-a-file-to-the-terminal-starting-at-some-line-number/</link>
<description><![CDATA[ <p>tail -n+99 foo.txt will read everything from foo.txt, starting with line 99.  Pipe that into more and you just look at the few line(s) you really need.

To narrow this so it only prints the interesting lines (and not everything after those lines), see the nice solutions from [deepsoul,](http://snipplr.com/users/deepsoul) below.</p> ]]></description>
<pubDate>Tue, 15 Jul 2008 15:50:36 GMT</pubDate>
<guid>http://snipplr.com/view/7309/dump-a-file-to-the-terminal-starting-at-some-line-number/</guid>
</item>
<item>
<title>(Bash) Examine CRL file from the command line - breakerjump</title>
<link>http://snipplr.com/view/6561/examine-crl-file-from-the-command-line/</link>
<description><![CDATA[ <p>This rendition works for most of my tasks, but the inform may need to be changed to suit base64 encoded files.</p> ]]></description>
<pubDate>Wed, 04 Jun 2008 03:10:04 GMT</pubDate>
<guid>http://snipplr.com/view/6561/examine-crl-file-from-the-command-line/</guid>
</item>
<item>
<title>(Bash) Before and After - lakedenman</title>
<link>http://snipplr.com/view/5955/before-and-after/</link>
<description><![CDATA[ <p>"-b" and "-a" tells grep to show you 10 lines before and 10 lines after</p> ]]></description>
<pubDate>Tue, 22 Apr 2008 11:06:09 GMT</pubDate>
<guid>http://snipplr.com/view/5955/before-and-after/</guid>
</item>
</channel>
</rss>