[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Importing all files into .org document source blocks
From: |
Myles English |
Subject: |
Re: [O] Importing all files into .org document source blocks |
Date: |
Fri, 24 May 2013 21:49:00 +0100 |
User-agent: |
mu4e 0.9.9.5-dev6; emacs 24.3.1 |
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