a-shell
a-shell copied to clipboard
Variable Emulation
While I realize this might be a bit of a duplicate issue, and full shell is not something easy to achieve, and remains a longer term goal, I was wondering whether in the meantime it would be possible to offer something that made shell-style variables and their use possible, but realize full scripting and a more developed shell environment may well be required, so if this is impossible forgive this issue!
Hi,
I think setenv
, printenv
and env
might be the answer to your questions. These can be used in Python, Lua and C programs.
Thanks for the quick response! I was just thinking along the lines of e.g. time=$( date +%s ) so you could store command output in variables and use in subsequent shell commands, but I could of course use python instead.
Ah yes. That syntax is well beyond what we can do for now. The plan is to port a full shell, which would allow for this sort of redirection, but that's a distant goal. I've already tried twice (and failed).
Thanks. I have managed to work around it alright so far, but just wanted to put it out there. I look forward to that distant future :)
So things like emptying a directory via
rm `ls`
wouldn't work unless a full shell was ported?
Yes, that syntax is also not working yet. I would like to, but it's difficult.