1

Permutation

view story
linux-howto

http://www.unix.com – Hi, I am trying to permutate each column (Except for IDS). file.txt Code: FID IID TOAST1 TOAST2 TOAST3 ID3 ID3 1 -9 2 ID4 ID4 2 1 1 ID1 ID1 -9 -9 1 ID8 ID8 1 1 -9 ID12 ID12 1 2 2 for toast1 column, there are two 1's, two 2's and one -9. Having the same number of denominations, I want to permute the TOAST1 Code: TOAST1 1 1 2 2 -9 is one way, the another way will be Code: TOAST1 2 1 2 -9 1 I would like to do this in a loop so that I can permutate each column (not the IDs) automatically. I would also want to permuate toast2 toast3 and have the results as an one file. (HowTos)