I encountered this issue when attempting to create an iOS 16.4 ramdisk, here are the last few lines of output
krnl
dtre
rtsc
rdsk
./sshrd.sh: line 276: [: : integer expression expected
hdiutil: resize: failed. Invalid argument (22)
[-] An error occurred