X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=study-note.org;h=d9543abb92529ce9ed93d8c1b59e30a6e0360543;hb=774a3d896f8b77326977eabbad6b96163e8ac82f;hp=8767fd4e36923abb6d06862d73e846c14f6f5910;hpb=da1f2d26662d650f98d4d5576a01f153628411d2;p=dotfiles.git diff --git a/study-note.org b/study-note.org index 8767fd4..d9543ab 100644 --- a/study-note.org +++ b/study-note.org @@ -71,6 +71,28 @@ 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 + +*** Special Variable +See special variable in perl [[http://perldoc.perl.org/perlvar.html][perlvar]], or =perldoc perlvar= +- =$.= Current line number + ** gnuplog 1. normal