Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have not used the <code>md5deep</code> tool, but I believe those lines are error messages; they would be going to <a href="http://en.wikipedia.org/wiki/Standard_streams" rel="nofollow noreferrer">standard error</a> instead of standard out, and so they are going directly to your terminal instead of through the pipe. Thus, they won't be filtered by your sed command. You could filter them by merging your standard error and standard output streams, but </p> <p>It looks like (I'm not sure because you are missing the backquotes) you are trying to call </p> <pre><code>md5deep `find *` </code></pre> <p>and find is returning all of the files and directories.</p> <p>Some notes on what you might want to do:</p> <ul> <li><p>It looks like <code>md5deep</code> has a -r for "recursive" option. So, you may want to try:</p> <pre><code>md5deep -r * </code></pre> <p>instead of the find command.</p></li> <li><p>If you do wish to use a <code>find</code> command, you can limit it to only files using <code>-type f</code>, instead of files and directories. Also, you don't need to pass <code>*</code> into a find command (which may confuse <code>find</code> if there are files that have names that looks like the options that <code>find</code> understands); passing in <code>.</code> will search recursively through the current directory.</p> <pre><code>find . -type f </code></pre></li> <li><p>In <code>sed</code> if you wish to use slashes in your pattern, it can be a pain to quote them correctly with \. You can instead choose a different character to delimit your regular expression; <code>sed</code> will use the first character after the <code>s</code> command as a delimiter. Your pattern is also lacking a <code>.</code>; in regular expressions, to indicate one instance of any character you use <code>.</code>, and to indicate "zero or more of the preceding expression" you use <code>*</code>, so <code>.*</code> indicates "zero or more of any character" (this is different from glob patterns, in which <code>*</code> alone means "zero or more of any character").</p> <pre><code>sed "s|/.*||g" </code></pre></li> <li><p>If you really do want to be including your standard error stream in your standard output, so it will pass through the pipe, then you can run:</p> <pre><code>md5deep `find *` 2&gt;&amp;1 | awk ... </code></pre></li> <li><p>If you just want to ignore stderr, you can redirect that to <code>/dev/null</code>, which is a special file that just discards anything that goes into it:</p> <pre><code>md5deep `find *` 2&gt;/dev/null | awk ... </code></pre></li> </ul> <p>In summary, I think the command below will help you with your immediate problem, and the other suggestions listed above may help you if I did not undersand what you were looking for:</p> <pre><code>md5deep -r * | awk '{ print $1 }' </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload