LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-15-2008, 08:23 AM   #1
markraem
Member
 
Registered: Nov 2003
Posts: 82

Rep: Reputation: 15
how can I do an md5sum or fingerprint of a string in stead of a file ?


The linux md5sum command only accepts (existing) filenames as argument.

Is there any command (or shell script) that creates an md5sum of a string ?

Thanks in advance,

Mark.
 
Old 07-15-2008, 08:29 AM   #2
nottings
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
md5sum of string

md5sum can be tricked like this...

md5sum <<EOF
some text string that you want the md5sum of
ctrl + d

hope that helps...
 
Old 07-15-2008, 08:32 AM   #3
nottings
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
or, if you want to put it in a script where you can't physically press ctrl + d do it like this...

md5sum <<EOF
blah blah blah blah
EOF
 
Old 07-15-2008, 08:45 AM   #4
markraem
Member
 
Registered: Nov 2003
Posts: 82

Original Poster
Rep: Reputation: 15
thanks, for your workaround.

It works perfect !
 
Old 07-15-2008, 09:06 AM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Or simply in one line:
Code:
echo some text string that you want the md5sum of | md5sum
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
file utility md5sum slackamp Slackware 11 06-04-2007 08:36 PM
md5sum different on gzipped file, but same when gunzipped jim-j Linux - Software 2 12-07-2006 09:41 PM
md5sum file satimis Fedora 2 02-24-2006 10:46 AM
Lilo 'stead of Grub E.T.Me Linux - Newbie 3 08-28-2004 07:15 AM
md5sum how do you check a file with it ? Joe47 Linux - Newbie 6 11-30-2003 08:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration