perl note
authorPeng Li <seudut@gmail.com>
Thu, 25 Aug 2016 15:21:44 +0000 (23:21 +0800)
committerPeng Li <seudut@gmail.com>
Thu, 25 Aug 2016 15:21:44 +0000 (23:21 +0800)
emacs.d/config.org
study-note.org

index f412f50..84e80fd 100644 (file)
@@ -1104,7 +1104,6 @@ Toggle an eshell in split window below, refer [[http://www.howardism.org/Technic
 #+END_SRC
 
 * Misc Settings
-
 ** [[https://github.com/abo-abo/hydra][Hydra]]
 *** hydra install
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
index 8767fd4..61823e7 100644 (file)
@@ -71,6 +71,24 @@ Or
   perl -ne 'print "$1\n" if /aaa=(\d+)\s.*/' xxx.log;
 #+END_SRC
 
+#+BEGIN_SRC fundamental :tangle ./temp/aa.txt
+  aa: 1
+  bb: 2
+  cc: 3
+  dd: 4
+#+END_SRC
+
+#+BEGIN_SRC sh :results output replace
+  perl -wnl -e 'print "==$.: $_"' ./temp/aa.txt
+#+END_SRC
+
+#+RESULTS:
+: ==1: 
+: ==2: aa: 1
+: ==3: bb: 2
+: ==4: cc: 3
+: ==5: dd: 4
+
 ** gnuplog
 
 1. normal