Skip to content

Instantly share code, notes, and snippets.

@luisadha
Created January 8, 2023 17:56
Show Gist options
  • Save luisadha/0ee8b1ac7ba9541011934823bc3353a6 to your computer and use it in GitHub Desktop.
Save luisadha/0ee8b1ac7ba9541011934823bc3353a6 to your computer and use it in GitHub Desktop.
#!/bin/bash
OUTFD='/sdcard/Download/dircontent_sdcard.txt'
export OUTFD
cd /sdcard
clear
ls -ap --color | grep '/' > $OUTFD
echo "Captured";
echo "Do you want to see the result? [Y/n] "
read REPLY
case $REPLY
in
Y | y)
echo
cat $OUTFD
echo
echo "Please check the output manuallyl in $OUTFD"
return 0;;
N | n)
clear
return 1;;
*)
echo "cobs lagi";;
esac
return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment