[T106][ZXW-22]7520V3SCV2.01.01.02P42U09_VEC_V0.8_AP_VEC origin source commit
Change-Id: Ic6e05d89ecd62fc34f82b23dcf306c93764aec4b
diff --git a/ap/app/busybox/src/applets_sh/README b/ap/app/busybox/src/applets_sh/README
new file mode 100644
index 0000000..9dcd38a
--- /dev/null
+++ b/ap/app/busybox/src/applets_sh/README
@@ -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.
diff --git a/ap/app/busybox/src/applets_sh/dos2unix b/ap/app/busybox/src/applets_sh/dos2unix
new file mode 100755
index 0000000..0fd5206
--- /dev/null
+++ b/ap/app/busybox/src/applets_sh/dos2unix
@@ -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$//' "$@"
diff --git a/ap/app/busybox/src/applets_sh/nologin b/ap/app/busybox/src/applets_sh/nologin
new file mode 100755
index 0000000..3768eaa
--- /dev/null
+++ b/ap/app/busybox/src/applets_sh/nologin
@@ -0,0 +1,4 @@
+#!/bin/sh
+cat /etc/nologin.txt 2>/dev/null || echo "This account is not available"
+sleep 5
+exit 1
diff --git a/ap/app/busybox/src/applets_sh/tac b/ap/app/busybox/src/applets_sh/tac
new file mode 100755
index 0000000..c5a8e39
--- /dev/null
+++ b/ap/app/busybox/src/applets_sh/tac
@@ -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
diff --git a/ap/app/busybox/src/applets_sh/unix2dos b/ap/app/busybox/src/applets_sh/unix2dos
new file mode 100755
index 0000000..70e0429
--- /dev/null
+++ b/ap/app/busybox/src/applets_sh/unix2dos
@@ -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/' "$@"