emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] :noweb from external file


From: edgar
Subject: Re: [O] :noweb from external file
Date: Sat, 01 Jul 2017 07:36:05 +0000
User-agent: Roundcube Webmail/1.2.4

On 2017-07-01 06:53, address@hidden wrote:
* Contribution: Script to convert directory with source to an org-file
So, by now, everybody knows that I don't understand squat about lisp.
Yet, I created a little bash script (for which there may be an
alternative already) to convert a directory with source files (in
Python) to source blocks within an Org file. It should be easily
adaptable to other languages. I hope that it is useful to someone. See
attachment.


Oops, missed the name file in the awk line

modified   dir-to-org-babel.org
@@ -58,7 +58,7 @@ load into the Library of Babel by doing
           while IFS= read -r -d '' file; do
               # *** Print file only if it has code
               # **** Get number of lines with awk
-              numl=$(awk 'END{print NR}')
+              numl=$(awk 'END{print NR}' "$file")
               if [[ "$numl" -gt 0 ]]; then
                   # *** Print the file names (in quotation
                   # format; with spaces like \ )

-------------------------------------------------

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!


reply via email to

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