excel - Is there a way to save a mac terminal output directly to a file? -
i carrying out research project need quite lot of calculations. calculated lot of features structures present in .sdf file. automated entire process , carried out in terminal of mac.
the thing is, there on 48 rows , 1500 columns. manually typing in data excel sheet strenuous task. wondering whether there way directly save data excel sheet or not.
whether sorted out or not not matter. think effort put sorting file quite less manually making one.
it being outputted numbers separated indentation. example,
(9613791) 2.69174 4.00454 4.2916 6.25497 6.65652 6.5094 5.18009 5.15649 5.823377.19567 8.21786 6.99439 16.2414 30.3753 30.6785 32.3146 30.0467 51.6735 25.142149.4748 51.7923 42.1594 52.7151 36.7925 1385.6 2004.66 2277.51 2055.07 2273.911577.31 996.44 2300.92 1986.91 1913.57 1486.7 2496.63 2.45285 3.78492 4.502884.55984 2.82045 2.75078 1.31798 4.53201 4.57725 3.39381 2.39053 3.80041 (6326464) 6.14815 5.46639 4.81788 6.00802 10.6837 8.52504 7.72782 8.05056 8.8713412.2334 12.8092 7.97405 20.3998 18.8032 25.2747 31.2464 33.5688 42.0236 25.741528.9837 33.9351 40.8985 47.1114 31.8816 752.681 1090.84 1049.61 953.366 1405.21942.868 876.854 1345.75 1178.31 1467.03 1395.57 1371.48 2.67685 3.35145 5.508316.20868 5.91418 4.43033 3.44952 6.23538 5.99355 6.30963 7.03768 6.14026 `
note: small snippet of actual output. not post image until got 10 points. need data between 2 numbers put bracket between in 1 row. next row starts second number between brackets. there around 1500 columns of such data. suggested @deceze in comment, try alter program implement function automatically save data. there alternative method can me expedite process without trying make changes program?
imagine mysterious program called fred
, run typing
./fred
in terminal. now, can make output sent file called file.txt
running this:
./fred > file.txt
now, can copy first 10 lines of file running command:
head -10 file.txt | pbcopy
and click edit
under question , paste (with command-v) first 10 lines in can see talking about.
if want first number of every line in file put csv
file called lovely.csv
can this:
awk '{print $1}' file.txt > lovely.csv
if want 9th column every line, change $1
above $9
.
if want 1st, 2nd , 4th field, use
awk '{print $1,$2,$4}' file.txt > lovely.cv
Comments
Post a Comment