![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cksum dependencies | vibhor_agarwali | UNIX for Advanced & Expert Users | 3 | 09-05-2007 03:38 AM |
| using cksum | leeRoberts2007 | Shell Programming and Scripting | 4 | 05-31-2007 10:30 PM |
| cksum question | rjsha1 | Shell Programming and Scripting | 4 | 01-17-2006 11:44 AM |
| Anyone know how cksum works? | kapolani | Shell Programming and Scripting | 5 | 10-28-2004 10:46 AM |
| cksum parts of a file | crazykelso | UNIX for Dummies Questions & Answers | 6 | 07-30-2002 12:38 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
The cksum Problem
Hi,
I have a working script, well it works on my machine but when I try it on others the cksum section does not work properly (I know the scripting is not of a high quality but I'm just trying to get it working) Heres the script: #!/bin/sh case $# in 0) echo "usage: enshar filename filename2 ...";; *) for file do if [ -d $file ] then echo "usage: cannot shar directory" elif [ ! -f $file ] then echo "usage: file does not exist" elif [ ! -r $file ] then echo "usage: file is not readable" else echo "cat > $file <<\!EnShAr!" cat $file echo "!EnShAr!" echo "set 'cksum $file'" cksum $file > temp1 awk '/^/ {print $1}' temp1 > temp2 echo "test \$1 =" > temp1 more temp2 >> temp1 echo "|| echo \$0: BAD checksum in $file >&2" >> temp1 tr "\n" " " < temp1 > temp2 more temp2 echo fi done ;; esac My problem is: I need to get cksum to function properly, I need it to check the file before transfer, then after and display the number ( in some cases in just shows ::::::::: ), any help is very appreciated. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|