[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pipe bash file contents to shell

From: linuxfever
Subject: Re: Pipe bash file contents to shell
Date: Thu, 30 Jun 2011 13:48:24 -0700 (PDT)

So, the idea is that my script will contain lines of this form:

./c_code args

where c_code is a C program in the same directory where my bash file is.
Therefore, the idea is the following:

1) Highlight line
2) open shell (if one does not exist already) and cd to the directory where
the bash file is
3) send the line to the shell

Ideally, all this would be happening in the background; something similar to
what ESS does for the R language.

Thanks for your help!

Andreas Röhler wrote:
> Am 30.06.2011 16:33, schrieb linuxfever:
>> Hello all,
>> I was wondering whether there is a way to pass contents of a bash script
>> file into a shell buffer in Emacs (23.2). For example, if my bash file
>> contains a single line "ls -al", I would like to highlight that line, and
>> by
>> pressing a keybind, have the command executed and its output shown in the
>> shell buffer.
>> Is it at all possible? Thanks for any suggestions!
> eh, correcting my previous messages.
> "shell-command-on-region" is here not the right starting point.
> So let me consider your question again:
> you have a bash-script. To which directory would `ls -al' point?
> How it's written?
> Basically it's possible.
> However, maybe to get the results you want, Emacs provides better ways, 
> for example via dired.
> Andreas

View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]