handle executables anywhere on line

This commit is contained in:
ville rantanen
2014-05-20 21:09:33 +03:00
parent 4d6f25c631
commit 94ffa25e72

View File

@@ -40,7 +40,7 @@ function slide_exec {
!/^# /{ !/^# /{
print $0; print $0;
} }
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "^\&( " | sed -e 's,^\&( ,,' -e 's,)$,,' ) ' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "\&(.*)" | sed -e 's,[^\&]*\&( ,,' -e 's,)[^)]*,,' )
# restore cursor position to bottom of slide # restore cursor position to bottom of slide
echo -ne "${E}u" echo -ne "${E}u"
while read line while read line
@@ -53,7 +53,7 @@ function slide_exec {
!/^# /{ !/^# /{
print $0; print $0;
} }
' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "^\$( " | sed -e 's,^\$( ,,' -e 's,)$,,' ) ' "$1" | sed -n '/^'$2'# /,/^'$j'# /p' | grep "\$(.*)" | sed -e 's,[^\$]*\$( ,,' -e 's, )[^)]*,,' )
} }
@@ -234,8 +234,9 @@ Object Area Perimeter
* "$ ( command )" to print the output * "$ ( command )" to print the output
* "& ( command )" run process in background * "& ( command )" run process in background
&( xeyes ) &( xeyes )
$( ls ) $( ls )
$( echo You can hide commands too... )Hidden command
# Hints: Other tools # Hints: Other tools
@@ -257,7 +258,7 @@ $( ls )
_jgs______/_ __ \__________ _jgs______/_ __ \__________
| | | |
| MarkSlider | | MarkSlider |
|___________________________| |___________________________|
# Hints: More tools # Hints: More tools
* JPEG to ascii: jp2a * JPEG to ascii: jp2a