applets_sh/*: Add a few more examples of "shell applets"
Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
594db1e62a
commit
d0222503ff
5
applets_sh/README
Normal file
5
applets_sh/README
Normal file
@ -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.
|
5
applets_sh/dos2unix
Executable file
5
applets_sh/dos2unix
Executable file
@ -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$//' "$@"
|
7
applets_sh/tac
Executable file
7
applets_sh/tac
Executable file
@ -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
|
5
applets_sh/unix2dos
Executable file
5
applets_sh/unix2dos
Executable file
@ -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/' "$@"
|
Loading…
Reference in New Issue
Block a user