I'm new-ish to Linux, thanks for any help and sorry if this has been asked somewhere else.
1) I need to transpose the rows and columns of a matrix. I've been trying to use the code suggested here:
but I don't know how to follow the instruction to "save the code to a file, make it executable, and invoke it with one argument, the name of the data file."
I tried saving the code to a text file called transpose, giving it a .sh extension. i also did 'chmod ugo+x tranpose.sh' and verified with 'ls -l' that it is an executable (also it showed up in green text at that point). nevertheless it tells me when I tried " ./transpose.sh "
that 'command not found.'
i tried the same syntax on another executable .sh file and it worked...then i pasted this code into that file and it stopped working and told me command not found again. what's going on?
2) is there a better way to transpose than the code i'm using? like the OP in that thread i have a huge file, ~8500 rows and several hundred thousand columns.
3) after transposing (or before) i need to calculate, for each row, both the average of the raw values and the average of the square of the raw values. can linux do this kind of simple math?
Thanks very much for your help.