unix/system comand Always print out some environment setting when using it

1 view (last 30 days)
When I use the command unix or system, it will always print out some settings in the screen, it really bothers me. Could anyone help me?
The first line following my command is not what I want. See these pictures for illustration. Thanks advance! Thank you very much!
ruth wang
ruth wang on 4 Jul 2022
It will display nothing if I use [a,b]=system('pwd').
I found that it was because I used 'echo' in my cshrc file. After comment it, it fixes the problem and works fine as usual. Thank you anyway.

Sign in to comment.

Answers (1)

Jan on 30 Jun 2022
% Without semicolon:
ans = 0
% With semicolon:
% With semicolon and catching outputs:
[status, out] = system('pwd');
The last version helps.
  1 Comment
ruth wang
ruth wang on 4 Jul 2022
I solved this problem by comment 'echo' in my unix environment setting. Thank you very much.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by