I am a novice and I am using APL to calculate the
points for a surface. The output will go to another
program. The goal is to write a matrix, with the correct number of rows
and columns, to a file. Elements should be separated by
and rows should be separated by . I have found that
the output is fo
Try adding the option "--PW 1000" (or any large number less than
1). That will set the print width to huge.
The tr utility with the -s option can compress repeated spaces into a
single space.
sed '$d' will kill the last line.
So something like
apl --PW 500 --eval "2 70⍴⍳140" | tr -s
If you change your printing width APL may not print the overflow of each
line as a separate line.
tmp←2 50 ⍴ ⍳ 100
⎕pw←225
tmp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
49