From: kinoshita-eos Date: Thu, 30 Oct 2014 02:25:10 +0000 (+0900) Subject: Add: Basic tutorial for PIONE X-Git-Tag: v2.0.2p0053 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=refs%2Ftags%2Fv2.0.2p0053;p=eos%2Ftutorial.git Add: Basic tutorial for PIONE new file: SampleCode/PIONE/Basic1/HelloWorld.pione new file: SampleCode/PIONE/Basic2/Multiplying.pione new file: SampleCode/PIONE/Basic2/Multiplying2.pione new file: SampleCode/PIONE/Basic2/MultiplyingInput/test.in new file: SampleCode/PIONE/Basic3/MultiplyingFiles1.pione new file: SampleCode/PIONE/Basic3/MultiplyingFiles2.pione new file: SampleCode/PIONE/Basic3/MultiplyingFiles3.pione new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test1.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test2.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test3.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test4.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test5.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test6.in new file: SampleCode/PIONE/Basic3/MultiplyingFilesInput/test7.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesEach.pione new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test1.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test2.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test3.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test4.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test5.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test6.in new file: SampleCode/PIONE/Basic4/MultiplyingFilesInput/test7.in new file: SampleCode/PIONE/Basic5/Serial2.pione new file: SampleCode/PIONE/Basic5/SerialInput/test1.in new file: SampleCode/PIONE/Basic5/SerialInput/test2.in new file: SampleCode/PIONE/Basic5/SerialInput/test3.in new file: SampleCode/PIONE/Basic5/SerialInput/test4.in new file: SampleCode/PIONE/Basic5/SerialInput/test5.in --- diff --git a/SampleCode/PIONE/Basic1/HelloWorld.pione b/SampleCode/PIONE/Basic1/HelloWorld.pione new file mode 100644 index 0000000..ed1ca77 --- /dev/null +++ b/SampleCode/PIONE/Basic1/HelloWorld.pione @@ -0,0 +1,6 @@ +Rule Main + output 'message.txt' + +Action + echo "Hello PIONE world !" > message.txt +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic2/Multiplying.pione b/SampleCode/PIONE/Basic2/Multiplying.pione new file mode 100644 index 0000000..ddd8a2e --- /dev/null +++ b/SampleCode/PIONE/Basic2/Multiplying.pione @@ -0,0 +1,7 @@ + Rule Main + input 'test.in' + output 'test.out' + + Action + awk '{ print $1*2 }' {$I[1]} > {$O[1]} + End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic2/Multiplying2.pione b/SampleCode/PIONE/Basic2/Multiplying2.pione new file mode 100644 index 0000000..0b6d4c8 --- /dev/null +++ b/SampleCode/PIONE/Basic2/Multiplying2.pione @@ -0,0 +1,7 @@ +Rule Main + input 'test.in' + output '{$I[1]}.out' + +Action + awk '{ print $1*2 }' {$I[1]} > {$O[1]} +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic2/MultiplyingInput/test.in b/SampleCode/PIONE/Basic2/MultiplyingInput/test.in new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/SampleCode/PIONE/Basic2/MultiplyingInput/test.in @@ -0,0 +1,2 @@ +3 +5 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFiles1.pione b/SampleCode/PIONE/Basic3/MultiplyingFiles1.pione new file mode 100644 index 0000000..64f1733 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFiles1.pione @@ -0,0 +1,10 @@ +Rule Main + input 'test1.in' + input 'test2.in' + output 'test1.out' + output 'test2.out' + +Action + awk '{print $1*2}' {$I[1]} > {$O[1]} + awk '{print $1*2}' {$I[2]} > {$O[2]} +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic3/MultiplyingFiles2.pione b/SampleCode/PIONE/Basic3/MultiplyingFiles2.pione new file mode 100644 index 0000000..fe0efd1 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFiles2.pione @@ -0,0 +1,11 @@ +Rule Main + input 'test1.in' + input 'test2.in' + output 'test1.out' + output 'test2.out' + +Action + for i in `ls *.in`; do + awk '{ print $1*2 }' $i > `basename $i .in`.out + done +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic3/MultiplyingFiles3.pione b/SampleCode/PIONE/Basic3/MultiplyingFiles3.pione new file mode 100644 index 0000000..b7fcd68 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFiles3.pione @@ -0,0 +1,9 @@ +Rule Main + input '*.in'.all + output '*.out'.all + +Action + for i in `ls *.in`; do + awk '{ print $1*2 }' $i > `basename $i .in`.out + done +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test1.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test1.in new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test1.in @@ -0,0 +1,2 @@ +3 +5 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test2.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test2.in new file mode 100644 index 0000000..da7f847 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test2.in @@ -0,0 +1,2 @@ +2 +4 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test3.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test3.in new file mode 100644 index 0000000..107b687 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test3.in @@ -0,0 +1,2 @@ +7 +1 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test4.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test4.in new file mode 100644 index 0000000..94c6da4 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test4.in @@ -0,0 +1,3 @@ +8 +9 +6 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test5.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test5.in new file mode 100644 index 0000000..0719398 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test5.in @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test6.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test6.in new file mode 100644 index 0000000..abb8f77 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test6.in @@ -0,0 +1,9 @@ +9 +8 +7 +6 +5 +4 +3 +2 +1 diff --git a/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test7.in b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test7.in new file mode 100644 index 0000000..2d66295 --- /dev/null +++ b/SampleCode/PIONE/Basic3/MultiplyingFilesInput/test7.in @@ -0,0 +1,10 @@ +1 +12 +123 +1234 +2 +23 +234 +3 +34 +4 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesEach.pione b/SampleCode/PIONE/Basic4/MultiplyingFilesEach.pione new file mode 100644 index 0000000..2d5e3a0 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesEach.pione @@ -0,0 +1,6 @@ +Rule Main + input '*.in' + output '{$I[1][1]}.out' +Action + awk '{ print $1*2 }' {$I[1]} > {$O[1]} +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test1.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test1.in new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test1.in @@ -0,0 +1,2 @@ +3 +5 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test2.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test2.in new file mode 100644 index 0000000..da7f847 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test2.in @@ -0,0 +1,2 @@ +2 +4 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test3.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test3.in new file mode 100644 index 0000000..107b687 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test3.in @@ -0,0 +1,2 @@ +7 +1 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test4.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test4.in new file mode 100644 index 0000000..94c6da4 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test4.in @@ -0,0 +1,3 @@ +8 +9 +6 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test5.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test5.in new file mode 100644 index 0000000..0719398 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test5.in @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test6.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test6.in new file mode 100644 index 0000000..abb8f77 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test6.in @@ -0,0 +1,9 @@ +9 +8 +7 +6 +5 +4 +3 +2 +1 diff --git a/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test7.in b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test7.in new file mode 100644 index 0000000..2d66295 --- /dev/null +++ b/SampleCode/PIONE/Basic4/MultiplyingFilesInput/test7.in @@ -0,0 +1,10 @@ +1 +12 +123 +1234 +2 +23 +234 +3 +34 +4 diff --git a/SampleCode/PIONE/Basic5/Serial2.pione b/SampleCode/PIONE/Basic5/Serial2.pione new file mode 100644 index 0000000..07e2632 --- /dev/null +++ b/SampleCode/PIONE/Basic5/Serial2.pione @@ -0,0 +1,21 @@ +Rule Main + input '*.in'.all + output '*.out'.all +Flow + rule First + rule Second +End + +Rule First + input '*.in' + output '{$I[1][1]}.route' +Action + awk '{ print $1*2 }' {$I[1]} > {$O[1]} +End + +Rule Second + input '*.route' + output '{$I[1][1]}.out' +Action + awk '{ print $1+1 }' {$I[1]} > {$O[1]} +End \ No newline at end of file diff --git a/SampleCode/PIONE/Basic5/SerialInput/test1.in b/SampleCode/PIONE/Basic5/SerialInput/test1.in new file mode 100644 index 0000000..7ee0007 --- /dev/null +++ b/SampleCode/PIONE/Basic5/SerialInput/test1.in @@ -0,0 +1,2 @@ +3 +5 diff --git a/SampleCode/PIONE/Basic5/SerialInput/test2.in b/SampleCode/PIONE/Basic5/SerialInput/test2.in new file mode 100644 index 0000000..da7f847 --- /dev/null +++ b/SampleCode/PIONE/Basic5/SerialInput/test2.in @@ -0,0 +1,2 @@ +2 +4 diff --git a/SampleCode/PIONE/Basic5/SerialInput/test3.in b/SampleCode/PIONE/Basic5/SerialInput/test3.in new file mode 100644 index 0000000..107b687 --- /dev/null +++ b/SampleCode/PIONE/Basic5/SerialInput/test3.in @@ -0,0 +1,2 @@ +7 +1 diff --git a/SampleCode/PIONE/Basic5/SerialInput/test4.in b/SampleCode/PIONE/Basic5/SerialInput/test4.in new file mode 100644 index 0000000..94c6da4 --- /dev/null +++ b/SampleCode/PIONE/Basic5/SerialInput/test4.in @@ -0,0 +1,3 @@ +8 +9 +6 diff --git a/SampleCode/PIONE/Basic5/SerialInput/test5.in b/SampleCode/PIONE/Basic5/SerialInput/test5.in new file mode 100644 index 0000000..0719398 --- /dev/null +++ b/SampleCode/PIONE/Basic5/SerialInput/test5.in @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9