From mboxrd@z Thu Jan 1 00:00:00 1970 From: Myles English Subject: Re: Importing all files into .org document source blocks Date: Fri, 24 May 2013 21:49:00 +0100 Message-ID: <871u8w2jer.fsf@gmail.com> References: <87y5b47ffj.fsf@krugs.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:48819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufysz-0001rb-EY for emacs-orgmode@gnu.org; Fri, 24 May 2013 16:46:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ufysu-0004gS-JP for emacs-orgmode@gnu.org; Fri, 24 May 2013 16:46:49 -0400 Received: from mail-we0-x22d.google.com ([2a00:1450:400c:c03::22d]:52145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ufysu-0004gN-Cc for emacs-orgmode@gnu.org; Fri, 24 May 2013 16:46:44 -0400 Received: by mail-we0-f173.google.com with SMTP id p57so2921623wes.4 for ; Fri, 24 May 2013 13:46:42 -0700 (PDT) In-reply-to: <87y5b47ffj.fsf@krugs.de> 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: "Rainer M. Krug" Cc: emacs-orgmode@gnu.org Hi Rainer, Rainer M. Krug writes: > Is there a way of importing all files in a directory > (/etc/apt/sources/list.d/) into an org document, with each being in a > separate code block? Maybe this?: for i in `find . -maxdepth 1 -type f`; do echo "#+BEGIN_SRC :tangle /this/dir/${i}" >> afile.org cat "${i}" >> afile.org echo "#+END_SRC\n" >> afile.org done (this kind of reply is becoming a theme of mine) Myles