Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo -e "
- import numpy
- def fn():
- return numpy.arange(3)
- def fn2():
- return fn()**2
- print fn2()
- EOD
- def fun():
- return 5 * \
- 2
- print fun()
- EOD
- " | while IFS='' read -r line; do
- if [[ "${line}" = "EOD" ]]; then
- ~/Installations/sage/sage -c "${thecode}"; thecode=""
- else
- thecode="${thecode}
- ${line}"
- fi
- done
- [0 1 4]
- 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement