Prev: how to transpose large matrix?
Next: vpath w/implicit pattern rule, & non-basename target (GNU make)
From: Colin Macleod on 10 Jun 2010 17:20 "pg(a)gmail.com" <phil.ganchev(a)gmail.com> wrote in news:0554c0fe-fb41-408d- a96d-dfb2b3554464(a)y4g2000yqy.googlegroups.com: > Is there a way to make a Unix shell always store the output of its > command in a variable or a file, so that the output of the last > command is always available without re-running the command and without > copy-pasting from the terminal? Matlab has such a variable, which I > think is called "res". This is one of the features of a shell/terminal program I wrote - http://wiki.tcl.tk/gush . All output is saved, the output of command number n can be accessed as $out(n), its standard error output as $err(n), with $_ as a shortcut for the previous command's output. While this might sound very inefficient, I have not had problems in practice, and I've been using this shell full-time and almost exclusively for 3 years now. The systems I work on are rebooted weekly, so that puts a limit on the length of each session. I don't run character-graphic editors in the shell, instead using an editor that creates its own window eg. gvim. The shell is written in Tcl but the command syntax it accepts is pretty close to standard shells. Colin.
From: Robert Bonomi on 24 Jun 2010 14:27 In article <0554c0fe-fb41-408d-a96d-dfb2b3554464(a)y4g2000yqy.googlegroups.com>, pg(a)gmail.com <phil.ganchev(a)gmail.com> wrote: >Is there a way to make a Unix shell always store the output of its >command in a variable or a file, No, no way to make it happen automatically. Consider what would happen if there were such a 'feature', and somebody ran 'telnet localhost:chargen'
First
|
Prev
|
Pages: 1 2 Prev: how to transpose large matrix? Next: vpath w/implicit pattern rule, & non-basename target (GNU make) |