You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
385 B

#!/system/bin/sh
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo "Usage: termux-send-text [TEXT]"
echo "Send text to the Android system as arguments or standard input"
exit
fi
DATA="$@"
if [ -z "$DATA" ]; then
DATA="`cat -`"
fi
unset LD_LIBRARY_PATH
am start --user 0 \
-a android.intent.action.SEND \
-t "text/plain" \
--es android.intent.extra.TEXT "$DATA" \
> /dev/null