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"
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.
I have tried this code and I am told there is asyntax error from the very first line, it says it is unexpected, could any one give me some help on this?
can someone please give me the syntax for getting the $file to have a cksum run on it during a script (it is followed by text) please, i understand i can't use more so i need to use another method