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

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

  •  25-09-2019
  •  | 
  •  

Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top