dd errors with certain DVDs
Cameron Simpson
cs at zip.com.au
Wed Mar 28 00:39:12 UTC 2007
On 27Mar2007 19:15, Paul Smith <phhs80 at gmail.com> wrote:
| On 3/27/07, Cameron Simpson <cs at zip.com.au> wrote:
| >| | Your script is buggy (and needlessly complex). It can round the block
| >| | count down by one. Try this:
| >| | blocos=$(ls -l "$1" | awk '{ print ($5+2047) / 2048 }')
| >|
| >| My script is buggy too. Make it say this:
| >| blocos=$(ls -l "$1" | awk '{ print int(($5+2047) / 2048) + 1 }')
| >
| >Gah. My brain was off! The first version is correct:
| >
| > blocos=$(ls -l "$1" | awk '{ print ($5+2047) / 2048 }')
| >
| >See sig.
|
| The above does not work; the error is:
|
| $ dvdok backups.iso
| dd: invalid number `1.25073e+06'
Ouch. I dropped the "int()". try this:
blocos=$(ls -l "$1" | awk '{ print int(($5+2047) / 2048) }')
Sorry. Awk does floating point math.
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
You wouldn't... ...but you KNOW you could. - Original V65 Commercial
More information about the fedora-list
mailing list