~emersion/mrsh

ref: 32aff6e15dcabde2822abd06c8aa10ddc2e7144f mrsh/test/pipeline.sh -rw-r--r-- 627 bytes
32aff6e1Drew DeVault Mostly implement break and continue builtins 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

echo >&2 "Pipeline with 1 command"
echo "a b c d"

echo >&2 "Pipeline with 2 commands"
echo "a b c d" | sed s/b/B/

echo >&2 "Pipeline with 3 commands"
echo "a b c d" | sed s/b/B/ | sed s/c/C/

# https://github.com/emersion/mrsh/issues/100
#echo >&2 "Pipeline with subshell"
#(echo "a b"; echo "c d") | sed s/c/C/

# https://github.com/emersion/mrsh/issues/96
#echo >&2 "Pipeline with brace group"
#{ echo "a b"; echo "c d"; } | sed s/c/C/

# https://github.com/emersion/mrsh/issues/95
#echo >&2 "Pipeline with early close"
#(
#	i=0
#	while [ $i -lt 8096 ]
#	do
#		echo "Line $i"
#		i=$((i+1))
#	done
#) | head -n 1