title: Feed a command-line shell from another shell
body: <p>This question may sound weird but I'll explain the context and hopefully it will justify it. I'm on Linux trying to work with some ill-made shells.</p>
  
  <p>I have to work with <code>fdb</code> and <code>fcsh</code>, which are Adobe's commandline debugger and compiler shells for Flash. This isn't particularly relevant - only the fact that <em>they're shells</em>, i.e. you run <code>fdb</code>, it gives you a prompt like <code>(fdb)</code> and you type commands. All cool. </p>
  
  <p>BUT. Say you want to re-execute your last command, so you hit [Arrow-Up] on your keyboard, like you'd do in Bash, Python Shell, GDB shell etc. And it doesn't work. Instead of seeing the last command at the prompt, I see <code>(fdb) ^[[A</code> (note that <code>(fdb)</code> is the prompt). Pressing the [Arrow-Left] key to go back a few characters and fix your typed command - same story.</p>
  
  <p>This looks like Adobe didn't make its shells very well. Is there a way to open a simple bash shell (or something) that will keep feeding my commands to an open <code>fdb</code> shell, kept as a daemon? I hope that this way I get Bash's neat usability features for handling commands, but get them executed by <code>fdb</code>.</p>
  
  <p><em>Note:</em> I have found <a href="https://github.com/Draknek/fcsh-wrap/blob/master/fcsh-wrap" rel="nofollow">this wrapper</a> which keeps <code>fcsh</code> daemonized and holds it's pid file, I think. This is cool. I haven't used it yet, but considering it. Still, my question holds: is there a way to pipe commands from one shell to another?</p>