sage math software: using cli interface, is && operator(i.e. “background and control”?) functionality supported?

StackOverflow https://stackoverflow.com/questions/4209732

  •  25-09-2019
  •  | 
  •  

문제

I'm new to sage math software. i've been looking though sage documentation to find if the sage cli supports any way to run multiple commands one after another, i.e. behave like bash when using the && operator. for example, on linux:

$ cp file1 file2 && rm file1 

at the command line will copy file1 to file2 and after that operation is complete delete file1. for instance i would love to be able to do something like

sage: g = e^-x && g && x = g

from a sage prompt.

Does sage support this? is there a workaround if not?

thanks.

도움이 되었습니까?

해결책

so, the ";" symbol(semicolon) used in place of where i'm used to using && using bash seems to do the trick. if there are any differences i'm not aware of, i'd appreciate the info.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top