LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   md5sum (http://www.linuxquestions.org/questions/linux-newbie-8/md5sum-875991/)

ted_chou12 04-19-2011 06:00 PM

md5sum
 
Hi, why does md5sum return a dash at the end:
Code:

$ md5sum
string290350295 -

How can I remove this using the md5sum tags?
Thanks,
Ted

estabroo 04-19-2011 06:09 PM

the - is to indicate that the sum was from standard input as opposed to a file


md5sum | awk '{ print $1 }'

Telengard 04-19-2011 06:22 PM

Code:

dir1$ md5sum | cut -d ' ' -f 1
string
b80fa55b1234f1935cea559d9efbc39a
dir1$ md5sum <<< 'string' | cut -d ' ' -f 1
b80fa55b1234f1935cea559d9efbc39a
dir1$

:study:
http://www.gnu.org/software/coreutil...cut-invocation


All times are GMT -5. The time now is 11:17 PM.