forked from topjohnwu/ndk-busybox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applets_sh/*: Add a few more examples of "shell applets"
Signed-off-by: Pere Orga <[email protected]> Signed-off-by: Denys Vlasenko <[email protected]>
- Loading branch information
Showing
4 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This directory contains examples of applets implemented as shell scripts. | ||
|
||
So far these scripts are not hooked to the build system and are not | ||
installed by "make install". If you want to use them, | ||
you need to install them by hand. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
# TODO: use getopt to avoid parsing options as filenames, | ||
# and to support -- and --help | ||
[ $# -ne 0 ] && DASH_I=-i | ||
sed $DASH_I -e 's/\r$//' "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
# TODO: use getopt to avoid parsing options as filenames, | ||
# and to support -- and --help | ||
for i in "$@" | ||
do | ||
sed -e '1!G;h;$!d' "$i" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
# TODO: use getopt to avoid parsing options as filenames, | ||
# and to support -- and --help | ||
[ $# -ne 0 ] && DASH_I=-i | ||
sed $DASH_I -e 's/$/\r/' "$@" |