dd errors with certain DVDs

Cameron Simpson cs at zip.com.au
Mon Mar 26 23:04:46 UTC 2007


On 26Mar2007 15:34, I wrote:
| On 26Mar2007 09:26, I 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.
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

To be positive: To be mistaken at the top of one's voice.
Ambrose Bierce (1842-1914), U.S. author. The Devil's Dictionary (1881-1906).




More information about the fedora-list mailing list