regex for Win iso in dd
This commit is contained in:
parent
9bb4fe29c3
commit
b3df1bc1a3
1 changed files with 7 additions and 2 deletions
|
@ -30,7 +30,12 @@ LBA="$(dumpet -i Win*.iso \
|
|||
CDROM_SECTOR_SIZE=2048
|
||||
FLOPPY_SECTOR_SIZE=512
|
||||
|
||||
dd if=Win*.iso bs=${CDROM_SECTOR_SIZE} skip=${LBA} count=1 > win.dmp
|
||||
dd \
|
||||
if=`printf Win*.iso` \
|
||||
bs=${CDROM_SECTOR_SIZE} \
|
||||
skip=${LBA} \
|
||||
count=1 \
|
||||
> win.dmp
|
||||
FLOPPY_SECTORS="$(file win.dmp \
|
||||
| sed -e "s/.*sectors\ //" \
|
||||
| awk '{printf $1}')"
|
||||
|
@ -40,7 +45,7 @@ CDROM_SECTORS=`expr $FLOPPY_SECTOR_SIZE \
|
|||
/ $CDROM_SECTOR_SIZE`
|
||||
|
||||
dd \
|
||||
if=Win*.iso \
|
||||
if=`printf Win*.iso` \
|
||||
bs=${CDROM_SECTOR_SIZE} \
|
||||
skip=${LBA} \
|
||||
count=${CDROM_SECTORS} \
|
||||
|
|
Loading…
Reference in a new issue