Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Thank you for these commands. They look promising. Unfortunately I am getting a couple of errors. When I try the pr method, the input17x7 doesn't work (I am using 17x2). It treats 17x7 as an input file not as a description of the size of the matrix (pr: energies.in17x2: No such file or directory) When I try the rs utility, I get line 7: syntax error near unexpected token }' line 7: $ { printf 'Group\n' ; printf 'group%d\n' {2..18} ; cat energies.in17x2; } | rs -et 18 3' any ideas why? Thanks. Commented Feb 1, 2017 at 13:23
  • Hell I cannot seem to format the above comment to make it readable and in code. Sorry for it looking so messy. Commented Feb 1, 2017 at 13:26
  • For the first error I don't know - input17x7 was just my test file name since you didn't provide any appropriate data - its shouldn't have anything to do with the actual command that's run (it's the -7 argument that determines the number of output columns). For the second error, it sounds like you are using a POSIX sh shell rather than bash that you tagged your question with. Or did you include the $ shell prompt from my answer? That's not part of the command. Commented Feb 1, 2017 at 13:39
  • Ah the $ at the start must have been the issue. I have been reading tutorials on these commands and have decided to make 3 input files and use PR to sort them into one output of 3 columns, according to here: docstore.mik.ua/orelly/unix3/upt/ch21_15.htm .... I ran into a problem with a for do loop, though: i.imgur.com/ECoXAe9.png .... The loop of course executes each print command before starting over, yielding a column of 2.0, 2.5, 3.0...Is it possible to fully iterate one command before the next, so my output has 17 lines of 2.0, then 17 lines of 2.5, then 17 lines of 3.0 etc. ? Commented Feb 1, 2017 at 14:40
  • @Blaise if you have additional requirements then please edit your original question rather than posting them as comments - please post text rather than images of text. Commented Feb 1, 2017 at 14:45