From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Blank first line in a tangled file prevents src block execution Date: Fri, 09 Mar 2012 15:26:57 -0700 Message-ID: <874ntxs95a.fsf@gmx.com> References: <6613.1331330909@alphaville> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35491) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S68HI-0001Ci-Mi for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 17:27:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S68HG-00083c-Ld for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 17:27:12 -0500 Received: from mailout-us.gmx.com ([74.208.5.67]:46360) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1S68HG-00083T-E1 for emacs-orgmode@gnu.org; Fri, 09 Mar 2012 17:27:10 -0500 In-Reply-To: <6613.1331330909@alphaville> (Nick Dokos's message of "Fri, 09 Mar 2012 17:08:29 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: Emacs orgmode Nick Dokos writes: > Leo Alekseyev 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/