@@ -74,13 +74,13 @@ if $i is "foo"
74
74
echo "foo"
75
75
else
76
76
echo "bar"
77
-
77
+ </code >
78
+ <code >
78
79
if not $j is "foo" and $x is "bar"
79
80
if $j is "foo" or $j is "xfoo"
80
81
if $j > $y and $j != $y or $j >= $y
81
82
echo "foo"
82
-
83
- </code>
83
+ </code >
84
84
</pre>
85
85
</td>
86
86
<td>
224
224
# include bash- or powscript
225
225
# at compiletime (=portable)
226
226
require 'mymodule.pow'
227
-
227
+ </code >
228
+ <code >
228
229
# include remote bashscript
229
230
# at runtime
230
231
source foo.bash
@@ -249,7 +250,8 @@ bar()
249
250
echo "no argument given"
250
251
if not empty $1
251
252
echo "string given"
252
-
253
+ <code >
254
+ </code >
253
255
foo "$@"
254
256
</code >
255
257
</pre >
@@ -265,7 +267,8 @@ foo(){
265
267
echo "string given"
266
268
fi
267
269
}
268
-
270
+ </code >
271
+ <code >
269
272
foo "$@"
270
273
</code >
271
274
</pre >
@@ -279,17 +282,18 @@ foo "$@"
279
282
<code>
280
283
myfunc()
281
284
echo "value=$1"
282
-
285
+ </code >
286
+ <code >
283
287
echo -e "foo\nbar\n" | mappipe myfunc
284
-
288
+ </code >
289
+ <code >
285
290
# outputs: 'value=foo' and 'value=bar'
286
291
</code>
287
292
</pre>
288
293
</td>
289
294
<td>
290
295
<pre>
291
296
<code>
292
-
293
297
</code>
294
298
</pre>
295
299
</td>
@@ -311,7 +315,6 @@ math '9 / 2' 4
311
315
<td>
312
316
<pre>
313
317
<code>
314
-
315
318
</code>
316
319
</pre>
317
320
</td>
@@ -325,10 +328,10 @@ math '9 / 2' 4
325
328
myfunc()
326
329
sleep 1s
327
330
echo "one"
328
-
331
+ </code >
332
+ <code >
329
333
await myfunc 123 then
330
334
echo "async done"
331
-
332
335
</code >
333
336
</pre >
334
337
</td >
@@ -350,13 +353,14 @@ await myfunc 123 then
350
353
myfunc()
351
354
sleep 1s
352
355
echo "one"
353
-
356
+ </code >
357
+ <code >
354
358
await myfunc 123 then |
355
359
cat -
356
-
360
+ </code >
361
+ <code >
357
362
when done
358
363
echo "async done"
359
-
360
364
</code >
361
365
</pre >
362
366
</td >
@@ -379,7 +383,8 @@ myfunc()
379
383
sleep 1s
380
384
echo "one"
381
385
echo "two"
382
-
386
+ </code >
387
+ <code >
383
388
await myfunc 123 then for line
384
389
echo "line: $* "
385
390
when done
@@ -406,15 +411,13 @@ when done
406
411
json={}
407
412
cat package.json | json_decode json
408
413
echo $json[ 'repository.url']
409
-
410
- # outputs: git+https://[email protected] /coderofsalvation/powscript.git
411
414
</code >
412
415
</pre >
413
416
</td >
414
417
<td >
415
418
<pre >
416
419
<code >
417
-
420
+ # outputs: git+ https://[email protected] /coderofsalvation/powscript.git
418
421
</code>
419
422
</pre>
420
423
</td>
@@ -427,18 +430,17 @@ echo $json['repository.url']
427
430
<code>
428
431
myfunc()
429
432
echo "1=$1 2=$2"
430
-
433
+ </code >
434
+ <code >
431
435
curry curriedfunc abc
432
436
echo -e "foo\nbar\n" | mappipe curriedfunc
433
-
434
- # outputs: '1=abc 2=foo' and '1=abc 2=bar'
435
437
</code >
436
438
</pre >
437
439
</td >
438
440
<td >
439
441
<pre >
440
442
<code >
441
-
443
+ # outputs: '1=abc 2=foo' and '1=abc 2=bar'
442
444
</code>
443
445
</pre>
444
446
</td>
@@ -454,14 +456,12 @@ foo["one"]="foo"
454
456
foo[ "two"] ="bar"
455
457
map foo keys # prints key per line
456
458
map foo values # prints value per line
457
-
458
459
</code >
459
460
</pre >
460
461
</td >
461
462
<td >
462
463
<pre >
463
464
<code >
464
-
465
465
</code >
466
466
</pre >
467
467
</td >
@@ -474,7 +474,8 @@ map foo values # prints value per line
474
474
<code>
475
475
printitem()
476
476
echo "key=$1 value=$2"
477
-
477
+ </code >
478
+ <code >
478
479
foo={}
479
480
foo[ "one"] ="foo"
480
481
foo[ "two"] ="bar"
@@ -485,7 +486,6 @@ map foo printitem
485
486
<td >
486
487
<pre >
487
488
<code >
488
-
489
489
</code >
490
490
</pre >
491
491
</td >
@@ -501,14 +501,13 @@ bar={}
501
501
foo[ "one"] ="foo"
502
502
bar[ "foo"] ="123"
503
503
map foo values | unpipe pick bar
504
- # outputs: '123'
505
504
</code >
506
505
</pre >
507
506
</td >
508
507
<td >
509
508
<pre >
510
509
<code >
511
-
510
+ # outputs: '123'
512
511
</code>
513
512
</pre>
514
513
</td>
@@ -521,21 +520,21 @@ map foo values | unpipe pick bar
521
520
<code>
522
521
funcA()
523
522
echo "($1)"
524
-
523
+ </code >
524
+ <code >
525
525
funcB()
526
526
echo "|$1|"
527
-
527
+ </code >
528
+ <code >
528
529
compose decorate_string funcA funcB
529
530
decorate_string "foo"
530
-
531
- # outputs: '(|foo|)'
532
531
</code >
533
532
</pre >
534
533
</td >
535
534
<td >
536
535
<pre >
537
536
<code >
538
-
537
+ # outputs: '(|foo|)'
539
538
</code>
540
539
</pre>
541
540
</td>
0 commit comments