more changes for here-docs and $'...'; command optimization updates

This commit is contained in:
Chet Ramey
2022-01-31 09:53:03 -05:00
parent 6e1ab9a367
commit b325b0e96b
20 changed files with 423 additions and 56 deletions
+17
View File
@@ -45,3 +45,20 @@ $THIS_SH -c '$binecho c && $binecho d && echo e'
$THIS_SH -c 'trap "echo WORKS" EXIT ; $binecho x ; $binecho y ; $binecho z'
${THIS_SH} -c 'echo w ; { echo x ; $binecho y; }; $binecho z'
echo =====
( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ )
( trap "echo WORKS && rm $TMPDIR/x$$" EXIT && touch $TMPDIR/x$$ ; $binecho done )
( echo a && { $binecho b && $binecho c ; } && echo d )
( echo a && { $binecho b && $binecho c ; } && echo d ; $binecho e )
( echo A && $binecho B )
( $binecho c && echo d )
( $binecho c && $binecho d && echo e )
( trap "echo WORKS" EXIT ; $binecho x ; $binecho y ; $binecho z )
( echo w ; { echo x ; $binecho y; }; $binecho z )