Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checksum in the UNIX script itself?

Status
Not open for further replies.

BlackNBlue

IS-IT--Management
Jun 15, 2006
1
GB
Hi all,

I have some basic knowledge about UNIX admin and has been a UNIX user for a while, when it comes to scripting, I do know a little but won't say I am a pro in any sense.

I was recently asked to find out if I could edit an existing script in one of the systems severs so we can make it do slightly a bit more stuff than it is doing now. I uploaded the script via FTP and the script looks fine to me except that it seems to have lines of hex numbers at the end of every function. I am baffled by these lines of hex numbers and what they do.

I am thinking they may be checksum but I am not 100% sure, will these numbers affect the function of a script?
And if it is just rubbish, should I just delete the numbers and leave the texts as is?

I would have contact the original author of the script but unfortunately he is no longer in the company.

Below is an exampe of these hex numbers


0707010002141c000081b4009d351200004e4700000001406b42a7000006ac000000af0000106600000000000000000000001200000003install/preremove#!/sbin/sh


Cheers

BNB
 

Either you copied the wrong file or your script is corrupt.

Perhaps you copied a file used by some version control software instead of the actual script source.

[noevil]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
How did you transfer the file Ascii or Binary?

Also try viewing the orignal file on the unix server with

cat -v filename

This should show you any special characters within the file.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 

Also the file looks very much like a 'tar' file, try this:

Code:
tar tvf TheFile
[ponder]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top