If the chunksize is negative, chunks of size |chunksize| are read and the byte ordering of each chunk is reversed. The whole chunk will be reversed, so the chunk must be the same size as the data type, otherwise the order of the values in the chunk, as well as their endianness, will be reversed.
Output every third double (8-byte) in the file test.Bdouble
cat test.Bdouble | shredder 0 8 16
Extract and reverse the byte ordering of every third double (8-byte)
cat test.Bdouble | shredder 0 -8 16
Extract and reverse byte ordering of values 0, 1, 4, 5, 8, 9...
cat test.Bdouble | shredder 0 16 16 | shredder 0 -8 0
Output the doubles in positions 4, 7, 10, ..., 3i+4, ...
cat test.Bdouble | shredder 32 8 16
Output as text just the Dxx entry of the diffusion tensor in each voxel for the diffusion-weighted data file A.Bfloat acquired using the acquisition scheme detailed in A.scheme:
cat A.Bfloat | dtfit - A.scheme | shredder 16 8 56 | double2txt