diff options
Diffstat (limited to 'JsonMenu_Scripts')
-rwxr-xr-x | JsonMenu_Scripts/ls.json.sh | 10 |
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} }" |