Единственный известный мне способ - это перебор каждого поля:
$ echo "a:b:c:d:e:f:g:h:i" |
awk -F":" '{for(i=3;i<=NF-1;i++){printf "%s ", $i}print $NF}'
c d e f g h i
В качестве альтернативы вы можете просто использовать perl
:
$ echo "a:b:c:d:e:f:g:h:i" | perl -F":" -lane 'print "@F[2..$#F]"'
c d e f g h i
Или cut
:
$ echo "a:b:c:d:e:f:g:h:i" | cut -d: -f3-
c:d:e:f:g:h:i
Или sed
:
$ echo "a:b:c:d:e:f:g:h:i" | sed 's/\([^:]*:\)\{2\}//'
c:d:e:f:g:h:i
man losetup
-b, --sector-size size
Set the logical sector size of the loop device in bytes (since Linux 4.14). The option may be used when create a new loop device as well as stand-alone command to modify sector size of the already existing loop device.