Sorry for the necroposting but just found myself faced with same. So this may complement the instructions in the Kali page:
Each command is in its own line
end=7gb
define the end variable as 7gb;
read start _ < <(du -bcm kali-linux-1.0.8.amd64.iso | tail -1); echo $start
Here's the crux of the problem: you download the Kali iso and you have to create the persistence partition from the directory where the iso you downloaded is, so the new partition gets its start defined by the end of the ISO, which you copied byte-by-byte to the USB:
du -bcm kali-linux-1.0.8.amd64.iso
disk usage of the ISO file, in bytes, complete, and 1 megabyte block size;
tail -1
the previous command gives a couple of lines as a result, like:
3269 kali-linux-2019.2-i386.iso
3269 total
but we only care about the number before total, so first we strip the last (second) line and get:
3269 total
read start _
does the final trick: reads that line until the first space or first tab or first new line, the default internal field separators, stops there (underscore), and assigns that word to the variable start.
echo $start
fixes that number as the $start variable, since we didn't define with an equal sign.
parted /dev/sdb mkpart primary $start $end
This is the part that does the actual job of creating the partition, from the size in megabytes of the ISO files (3269mb, about 3gb) to the 7gb mark. That's the part that will become your persistence partition. Say you're ok with the program picking the start block, even if you lose some megabytes.
Remember to change sdX to the correct letter for your system. It's usually a lot higher than b (I have it in g, d and e) and I think they should avoid using b in examples, since many of us have two hard drives.