I have tried with the script
but it does not work.
milenko@milenko-desktop:~/MTM$ script output.txt
Script started, file is output.txt
milenko@milenko-desktop:~/MTM$ wc -l output.txt
0 output.txt
There are more than 4000000 lines on my screen a s a result of execution of a C code.Just part of this
4194282 0.166666 2.35285e-06 -56.2841 -137.299 -129.386 4 0.974001
4194283 0.166666 2.2536e-06 -56.4712 -129.67 -131.872 4 0.577388
4194284 0.166666 2.33943e-06 -56.3089 -131.649 -132.051 4 0.693404
4194285 0.166666 2.40782e-06 -56.1838 -139.678 -129.377 4 0.702479
4194286 0.166666 2.61584e-06 -55.8239 -125.733 -128.783 4 0.585886
4194287 0.166666 2.60877e-06 -55.8356 -129.239 -127.815 4 0.773082
4194288 0.166666 2.71129e-06 -55.6682 -129.591 -127.553 4 0.796556
4194289 0.166666 2.89225e-06 -55.3876 -125.257 -127.627 4 0.815006
4194290 0.166666 2.84658e-06 -55.4568 -129.576 -127.566 4 0.557463
4194291 0.166666 2.71516e-06 -55.662 -129.31 -128.904 4 0.797976
4194292 0.166666 2.56104e-06 -55.9158 -127.996 -128.422 4 0.895766
4194293 0.166666 2.6007e-06 -55.8491 -128.079 -129.663 4 0.503785
4194294 0.166666 2.40808e-06 -56.1833 -140.025 -128.88 4 0.857429
4194295 0.166666 2.33237e-06 -56.322 -126.524 -130.575 4 0.410364
4194296 0.166666 2.46136e-06 -56.0883 -135.197 -130.224 4 0.833398
4194297 0.166666 2.48021e-06 -56.0551 -134.945 -131.935 4 0.856674
4194298 0.166666 2.43826e-06 -56.1292 -128.865 -128.875 4 0.490521
4194299 0.166666 2.45184e-06 -56.1051 -126.444 -129.16 4 0.935146
4194300 0.166667 2.51457e-06 -55.9954 -141.302 -130.337 4 0.745215
4194301 0.166667 2.47265e-06 -56.0684 -133.622 -131.74 4 0.541706
4194302 0.166667 2.45156e-06 -56.1056 -128.236 -128.832 4 0.503959
4194303 0.166667 2.54703e-06 -55.9397 -127.012 -127.581 4 1.10325
4194304 0.166667 2.55029e-06 -55.9341 -132.414 -127.012 4 0.475155
How to save this?
If I try script > output.txt
Script started, file is typescript
]0;milenko@milenko-desktop: ~/MTM[01;32mmilenko@milenko-desktop[00m:[01;34m~/MTM[00m$ exit
Script done, file is typescript
I have also tried
command | tee ~/outputfile.txt
But again
wc -l outputfile.txt
0 outputfile.txt
So this is not the right way.
script
command allows you to record the terminal session going forward - are you trying to save output that has already been displayed in your terminal?