How should I call the result after I run a code in ubuntu terminal?












1














I am trying to run a SageMath code on AWS through the Ubuntu terminal. I have successfully run the code. Now I want to see the computation results without abusing "print". The results are saved in several variables in my code. How should I call them after running the code?



The problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.



My Ubuntu version is 18.04 LTS.










share|improve this question




















  • 1




    Whats wrong with priting them, if you want to show them on the console?
    – vidarlo
    Dec 9 at 18:28










  • I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
    – J. Wang
    Dec 9 at 18:43










  • I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
    – vidarlo
    Dec 9 at 18:45












  • I see. Thank you! That helps a lot!
    – J. Wang
    Dec 9 at 18:48










  • Perhaps relevant? Hide the Output
    – steeldriver
    Dec 9 at 19:06
















1














I am trying to run a SageMath code on AWS through the Ubuntu terminal. I have successfully run the code. Now I want to see the computation results without abusing "print". The results are saved in several variables in my code. How should I call them after running the code?



The problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.



My Ubuntu version is 18.04 LTS.










share|improve this question




















  • 1




    Whats wrong with priting them, if you want to show them on the console?
    – vidarlo
    Dec 9 at 18:28










  • I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
    – J. Wang
    Dec 9 at 18:43










  • I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
    – vidarlo
    Dec 9 at 18:45












  • I see. Thank you! That helps a lot!
    – J. Wang
    Dec 9 at 18:48










  • Perhaps relevant? Hide the Output
    – steeldriver
    Dec 9 at 19:06














1












1








1







I am trying to run a SageMath code on AWS through the Ubuntu terminal. I have successfully run the code. Now I want to see the computation results without abusing "print". The results are saved in several variables in my code. How should I call them after running the code?



The problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.



My Ubuntu version is 18.04 LTS.










share|improve this question















I am trying to run a SageMath code on AWS through the Ubuntu terminal. I have successfully run the code. Now I want to see the computation results without abusing "print". The results are saved in several variables in my code. How should I call them after running the code?



The problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.



My Ubuntu version is 18.04 LTS.







command-line






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 9 at 18:45









vidarlo

8,88342442




8,88342442










asked Dec 9 at 18:15









J. Wang

61




61








  • 1




    Whats wrong with priting them, if you want to show them on the console?
    – vidarlo
    Dec 9 at 18:28










  • I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
    – J. Wang
    Dec 9 at 18:43










  • I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
    – vidarlo
    Dec 9 at 18:45












  • I see. Thank you! That helps a lot!
    – J. Wang
    Dec 9 at 18:48










  • Perhaps relevant? Hide the Output
    – steeldriver
    Dec 9 at 19:06














  • 1




    Whats wrong with priting them, if you want to show them on the console?
    – vidarlo
    Dec 9 at 18:28










  • I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
    – J. Wang
    Dec 9 at 18:43










  • I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
    – vidarlo
    Dec 9 at 18:45












  • I see. Thank you! That helps a lot!
    – J. Wang
    Dec 9 at 18:48










  • Perhaps relevant? Hide the Output
    – steeldriver
    Dec 9 at 19:06








1




1




Whats wrong with priting them, if you want to show them on the console?
– vidarlo
Dec 9 at 18:28




Whats wrong with priting them, if you want to show them on the console?
– vidarlo
Dec 9 at 18:28












I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
– J. Wang
Dec 9 at 18:43




I guess you are right. But the problem is that my output is large matrices. If I need to run other scripts and check the saved result frequently, it will be inefficient since I have to scroll up and down. So I wonder if there is a good way to call the result only when I need it.
– J. Wang
Dec 9 at 18:43












I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
– vidarlo
Dec 9 at 18:45






I do not know your software, but the common way would be to either print it, have the software you utilize write it to a file, or employ redirects (e.g. ./command > savedoutput). I also added your clarification to the question, so I hope someone familiar with your software can give you a perfect answer :)
– vidarlo
Dec 9 at 18:45














I see. Thank you! That helps a lot!
– J. Wang
Dec 9 at 18:48




I see. Thank you! That helps a lot!
– J. Wang
Dec 9 at 18:48












Perhaps relevant? Hide the Output
– steeldriver
Dec 9 at 19:06




Perhaps relevant? Hide the Output
– steeldriver
Dec 9 at 19:06















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099618%2fhow-should-i-call-the-result-after-i-run-a-code-in-ubuntu-terminal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1099618%2fhow-should-i-call-the-result-after-i-run-a-code-in-ubuntu-terminal%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Mont Emei

Province de Neuquén

Journaliste