read a .bin through terminal and output a checksum?
Hi all,
Ive been given a .bin file that I want to do a checksum on to make sure that it is consistant with what I know should be the checksum. I have tried using md5sum but it spits out a 128 bit line rather than a 32 bit line, which is what I want. Can someone help set me off in the right direction to develop a tool that will allow me to read each word in the .bin and compile a checksum together? I have never used unix before and I would like explanation on what I should do. Thanks in advance for any and all help.
Thanks for sending me that. Im definitely going to take a look at it.
I dont think I explained my goals. Im still new to all this so I may have stated it wrong. Basically, I want to take a file name (with the path) as an input, and I would like the output to be a computed checksum. I believe the checksum should be a 32 bit sum of all the words I have in the bin file.
I'm going to see what that site gives me scottn but if anyone else has any solutions I'd be more than welcome to hear them. Thanks.
Thanks scottn. I dont exactly know where to put all of this in. Do i type this into terminal and then just hit return? I dont understand how programming in terminal works. haha thanks again.
You could run it from the command line as you say, or from a script.
You can program "in the terminal" exactly as you would in a script.
If your shell is /bin/ksh, for example (echo $0 to see what shell you are running), you can type ksh commands on the command line exactly as you would write them in a script.
So whether you run
from the command line, or put it into a file and execute the file, the result is the same.
If you're very new to this you might want to avoid Perl just for now!
haha thanks again scottn. I really want to get Perl so im hoping to stick it out. So basically, i can type (echo $PWD/file1; cat file1) | cksum in the terminal and type in the file path where you have file1? Sorry for being so new to this.
Hello All,
I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly.
Is there any way to take the output from the cat... (7 Replies)
Hello
I am communicating with two devices using my computer over UDP protocol. The application is running fine. When I monitored the UDP traffic using Wireshark software, I found that there were too many Checksum errors.
Please find attached the png file showing this error. I am about to... (0 Replies)
for
ga016dgf -> /usr/bin/last | cut -c1-3
Invalid record size. Unable to continue ...
any ideas?
running on
ga016dgf -> uname -a
HP-UX ga016dgf B.11.31 U ia64 1246079591 unlimited-user license
thank you.
Video tutorial on how to use code tags in The UNIX and Linux Forums. (4 Replies)
I have a file named Me_thread_spell.txt that I want to split into smaller files. I want it to be split in each place there is a ;;;. For example,
blah blah blah ;;;
blah bhlah hlabl
awasnceuir
asenduhfoijhacseiodnbfxasd;;;
oabwcuhaweoir;;;
This full file would be three separate files... (7 Replies)
i am having a weird error on mac os x running some shell scripts. i am a complete newbie at this and this question concerns 2 scripts. one of which a friend of mine wrote (videochecker.sh) a couple weeks ago and it's been running fine on another machine.
then last week i wrote capture.sh and it... (2 Replies)
hi
how to read terminal command,
just i want to read all command which write on terminal
so please tell me any system call, api avilable in c for above purpose (6 Replies)
If I do:
cat file | write user
I can cat a file to a users terminal. My question is, how can this user read the input and cat it into a file?
I tried the reverse:
read | file
or
read > file
etc.
But it didn't work. (1 Reply)
Hello!
I'm using a perl script which calls the time and
date from a remote server using the line
/bin/date -
What is needed in this line to
reduce the output time
5 hours?
Thanks (2 Replies)
I have an application which has a lot of cout & cerr statements.
This application also opens a log file (for eg a.log).
When this application is run from the inittab file as follows
/bin/sh -c " . /etc/timezone; exec /test"
all the cout & cerr statements are printed in the log file... (1 Reply)