|
#1
| ||||
| ||||
| sha1sum on darwin? I tried enter the command, but it is not there... so it doesn't come with darwin? Do I need to get it from somewhere? |
|
#2
| ||||
| ||||
| Just incase someone searched for this and want to know how to do it, this is the command: openssl sha1 <path/filename.ext>
__________________ [SIGPIC][/SIGPIC] Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8 AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1 |
|
#3
| ||||
| ||||
| Very good of you to post the answer! Incidentally, most of those shortcut commands for openssl can be re-created by either making a one-liner shell script, or through Fink (I'm pretty sure Fink includes a few shortcuts like md5sum). For a one-liner shortcut, you could create a script called sha1sum with Code: #!/bin/bash /usr/bin/openssl sha1 $1 Though, IMHO, this type of shortcut is really not that useful.
__________________ michaelsanford.com Blog Twitter Tumblr LinkedIn iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD iMac G4 TFT 700 MHz | MacOS X 10.3.9 | 768 MB RAM, 40 GB HDD AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2120 GB RAID 1, 2500 GB RAID 0 |
|
#4
| ||||
| ||||
| With a bash like shell you can place the following in ~/.profile: Code: alias sha1="/usr/bin/openssl sha1"
__________________ [SIGPIC][/SIGPIC] Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8 AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1 |
|
#5
| ||||
| ||||
| Quite right! I don't use the alias directive enough to have made a correct suggestion on it. For example, I wasn't sure if you had to include a parameter variable in the alias directive like you do in a shell script (obviously not, from your example).
__________________ michaelsanford.com Blog Twitter Tumblr LinkedIn iBook G4 1.42 GHz | MacOS X 10.5-current | 1 GB RAM, 100 GB HDD iMac G4 TFT 700 MHz | MacOS X 10.3.9 | 768 MB RAM, 40 GB HDD AMD Athlon64 3500+ | Slackware 12 (2.6.21.5-smp) | 2 GB RAM, 2120 GB RAID 1, 2500 GB RAID 0 |
|
#6
| ||||
| ||||
| Aha, with alias, it is like a simple replacement macro in C, the bash interpreter search for sha1, replaces it with whatever in the quote ("/usr/bin/openssl sha1") THEN it is executed.
__________________ [SIGPIC][/SIGPIC] Catel - Core 2 Duo 2.0Ghz, 1GB Ram, OSX Tiger.8 AMDemon - Dual Opteron 2.6Ghz, 2GB Ram, FreeBSD 6.1 |
![]() |
| Thread Tools | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Darwin in VPC | Nummi_G4 | Unix & X11 | 3 | May 30th, 2003 09:03 AM |
| Darwin i86 help | VerzilliD | Unix & X11 | 0 | August 16th, 2002 10:39 AM |
| Welcome to Darwin! | julguribye | Apple News, Rumors & Discussion | 11 | December 19th, 2001 03:35 PM |
| Darwin x86 and Mac OS 10.1 | jeffberg | Apple News, Rumors & Discussion | 2 | September 14th, 2001 04:05 AM |
| Darwin on x86 | Jujucad | Mac OS X System & Mac Software | 5 | April 28th, 2001 03:45 AM |