Changes between Initial Version and Version 1 of Ticket #9386, comment 24
- Timestamp:
- 02/11/15 17:04:07 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #9386, comment 24
initial v1 13 13 > }}} 14 14 I agree with that approach. That was the main idea of allowing `sage_export` with a single argument (and I think I did run into some more complicated manipulations where I just decided to `sage_export` the variable beforehand and let the script do whatever it did before). 15 16 '''edit:''' Now I see where`#!sh` comes from: The `#!` is just a polite rendering of the adjective that is supposed to go in front of `sh`. 17 For {{{sage_export a `echo 1 2 3`}}} we could do 18 {{{ 19 if (( $# > 1 )); then 20 shift 21 export $varname="$*" 22 }}} 23 but then, of course, {{{sage_export a 1 2 3}}} would do the same thing, presumably with the arguments `1 2 3` rather arbitrarily joined together with spaces (almost guaranteed to trip up environment variable use elsewhere). Perhaps an error if more than 2 arguments are given?