aboutsummaryrefslogtreecommitdiff
path: root/JsonMenu_Scripts/ls.json.sh
diff options
context:
space:
mode:
Diffstat (limited to 'JsonMenu_Scripts/ls.json.sh')
-rwxr-xr-xJsonMenu_Scripts/ls.json.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/JsonMenu_Scripts/ls.json.sh b/JsonMenu_Scripts/ls.json.sh
new file mode 100755
index 00000000..9a6ab847
--- /dev/null
+++ b/JsonMenu_Scripts/ls.json.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+cmd="ls $1"
+OUT=""
+for name in `${cmd}`; do
+ if [ "${OUT}" != "" ] ; then
+ OUT="${OUT},"
+ fi
+ OUT="${OUT} \"${name}\" : { \"type\" : \"item\", \"action\" : \"${name}\"}"
+done
+echo "{ ${OUT} }"
bgstack15