From b3df1bc1a3e0ac6f20b4ba35c1dfac0bf5ed4979 Mon Sep 17 00:00:00 2001 From: cvoges12 Date: Fri, 8 Oct 2021 05:12:10 +0000 Subject: [PATCH] regex for Win iso in dd --- src/iso.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/iso.sh b/src/iso.sh index 6c4ae17..4e5ac3b 100755 --- a/src/iso.sh +++ b/src/iso.sh @@ -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} \