[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Blank first line in a tangled file prevents src block execution
From: |
Eric Schulte |
Subject: |
Re: [O] Blank first line in a tangled file prevents src block execution |
Date: |
Fri, 09 Mar 2012 15:26:57 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) |
Nick Dokos <address@hidden> writes:
> Leo Alekseyev <address@hidden> wrote:
>
>> I have the following source block that I tangle to produce a short script:
>>
>> #+begin_src sh :tangle code/get_wavs.sh
>> #!/bin/bash
>> for fn_in in "$@"; do
>> fn_out=$(sed -e 's|\.3gp$||g' -e 's|$|.wav|g' <<< $fn_in)
>> ffmpeg -i $fn_in -vn -f wav -acodec pcm_u8 $fn_out
>> done
>> #+end_src
>>
>> However, the tangled file has a blank first line. As a result, I
>> can't seem to run this script either using sh -c, or by putting it
>> inside a code block. In other words, the following line fails:
>>
>
> Add ":padline no"
>
Or try
#+begin_src sh :tangle code/get_wavs.sh :shebang #!/bin/bash
for fn_in in "$@"; do
fn_out=$(sed -e 's|\.3gp$||g' -e 's|$|.wav|g' <<< $fn_in)
ffmpeg -i $fn_in -vn -f wav -acodec pcm_u8 $fn_out
done
#+end_src
--
Eric Schulte
http://cs.unm.edu/~eschulte/