![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| which one method is best for debugging the shell script? | psiva_arul | UNIX for Advanced & Expert Users | 2 | 05-20-2008 03:33 AM |
| debugging a script?? | wrapster | Shell Programming and Scripting | 2 | 03-25-2008 08:07 AM |
| Nee help debugging script..plz | gzs553 | Shell Programming and Scripting | 8 | 11-24-2006 08:21 AM |
| FTP script debugging | alfredo123 | Shell Programming and Scripting | 1 | 11-08-2006 10:22 AM |
| HP-UX Debugging Shell script | shihabvk | Shell Programming and Scripting | 1 | 04-24-2006 06:55 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
cp script error, pls help in debugging!!!!
Hi all,
I searched to find out a few cp scripts that had progress bar, but did not compromise on performance, when my efforts were in vain i went ahead and wrote one of my own ,taking i/p frm other scripts... But this is causing some errors and am unable to debug it.....pls help Here is the code #!/bin/bash source=`stat -c %s $1` dest=`stat -c %s $2` while [ $source -ge $dest ];do cp -f $1 $2 & pct=$((( $dest * 100) / $source )) dest=`expr $dest+1` echo "$pct%" done bash3.2#./copy.sh <file1> <file2> Error: line 6:[0+1 interger expression expected ] ?? (Then i get the prompt), bash 3.2#No space left on the device What does this mean??? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
There must be spaces around the plus sign in the expr statement:
Code:
dest=`expr $dest + 1` |
|||
| Google The UNIX and Linux Forums |