document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("17\n");
document.write("18\n");
document.write("19\n");
document.write("20\n");
document.write("21\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'comment comment_line comment_line_number-sign comment_line_number-sign_shell\'># pdfs.log in this case is the result of doing something like: find /a/directory/somewhere -name &quot;*.pdf&quot; &gt; pdfs.log<\/span>\n");
document.write("\n");
document.write("<span class=\'keyword keyword_control keyword_control_shell\'>for<\/span> file <span class=\'keyword keyword_control keyword_control_shell\'>in<\/span> <span class=\'string string_interpolated string_interpolated_dollar string_interpolated_dollar_shell\'>$(cat pdfs.log)<\/span> <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>do<\/span> \n");
document.write("  <span class=\'keyword keyword_control keyword_control_shell\'>if<\/span> [ <span class=\'keyword keyword_operator keyword_operator_pipe keyword_operator_pipe_shell\'>!<\/span> -h <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span> ] <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>then<\/span>\n");
document.write("    echo <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;Checking for duplicates of: <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span>&quot;<\/span>\n");
document.write("    file_basename=<span class=\'string string_interpolated string_interpolated_dollar string_interpolated_dollar_shell\'>$(basename <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;<span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span>&quot;<\/span>)<\/span>\n");
document.write("    <span class=\'keyword keyword_control keyword_control_shell\'>for<\/span> duplicate <span class=\'keyword keyword_control keyword_control_shell\'>in<\/span> <span class=\'string string_interpolated string_interpolated_dollar string_interpolated_dollar_shell\'>$(cat pdfs.log)<\/span> <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>do<\/span>\n");
document.write("      <span class=\'keyword keyword_control keyword_control_shell\'>if<\/span> [ <span class=\'keyword keyword_operator keyword_operator_pipe keyword_operator_pipe_shell\'>!<\/span> -h <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span> ] <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>then<\/span>\n");
document.write("        <span class=\'keyword keyword_control keyword_control_shell\'>if<\/span> [ <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;<span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span>&quot;<\/span> <span class=\'keyword keyword_operator keyword_operator_pipe keyword_operator_pipe_shell\'>!<\/span>= <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;<span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span>&quot;<\/span> ] <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>then<\/span>\n");
document.write("          <span class=\'keyword keyword_control keyword_control_shell\'>if<\/span> [ <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;<span class=\'string string_interpolated string_interpolated_dollar string_interpolated_dollar_shell\'>$(basename <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span>)<\/span>&quot;<\/span> = <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;<span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file_basename<\/span>&quot;<\/span> ] <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>then<\/span>\n");
document.write("            cmp -s <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span> <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span>\n");
document.write("            <span class=\'keyword keyword_control keyword_control_shell\'>if<\/span> [ <span class=\'variable variable_other variable_other_special variable_other_special_shell\'>$?<\/span> -eq 0 ] <span class=\'keyword keyword_operator keyword_operator_list keyword_operator_list_shell\'>;<\/span> <span class=\'keyword keyword_control keyword_control_shell\'>then<\/span>            \n");
document.write("              echo <span class=\'string string_quoted string_quoted_double string_quoted_double_shell\'>&quot;ln -sf <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span> <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span>&quot;<\/span>\n");
document.write("              ln -sf <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$file<\/span> <span class=\'variable variable_other variable_other_normal variable_other_normal_shell\'>$duplicate<\/span>\n");
document.write("            <span class=\'keyword keyword_control keyword_control_shell\'>fi<\/span>\n");
document.write("          <span class=\'keyword keyword_control keyword_control_shell\'>fi<\/span>\n");
document.write("        <span class=\'keyword keyword_control keyword_control_shell\'>fi<\/span>\n");
document.write("      <span class=\'keyword keyword_control keyword_control_shell\'>fi<\/span>\n");
document.write("    <span class=\'keyword keyword_control keyword_control_shell\'>done<\/span>\n");
document.write("  <span class=\'keyword keyword_control keyword_control_shell\'>fi<\/span>\n");
document.write("<span class=\'keyword keyword_control keyword_control_shell\'>done<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/541184.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/541184\">Pastie #541184<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");
