We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I know that I can use the following command to copy a string to the clipboard
$ adb shell am start-activity \ -a android.intent.action.SEND \ -e android.intent.extra.TEXT "foo" \ -t text/plain \ com.tengu.sharetoclipboard
I also know that when the string has a space character, the space character needs to be escaped
$ adb shell am start-activity \ -a android.intent.action.SEND \ -e android.intent.extra.TEXT "foo\ bar" \ -t text/plain \ com.tengu.sharetoclipboard
Now, I want the string to have a newline character. I've tried the following commands with no avail.
$ adb shell am start-activity -a android.intent.action.SEND -e android.intent.extra.TEXT "foo\nbar" -t text/plain com.tengu.sharetoclipboard $ adb shell am start-activity -a android.intent.action.SEND -e android.intent.extra.TEXT "foo\\nbar" -t text/plain com.tengu.sharetoclipboard $ adb shell am start-activity -a android.intent.action.SEND -e android.intent.extra.TEXT "foo\rbar" -t text/plain com.tengu.sharetoclipboard $ adb shell am start-activity -a android.intent.action.SEND -e android.intent.extra.TEXT "foo\\rbar" -t text/plain com.tengu.sharetoclipboard
Any ideas on how to make the newline character to be inserted in the clipboard?
PS: I referenced this issue in this comment at Stack Overflow.
The text was updated successfully, but these errors were encountered:
For adb users
adb shell am start -a android.intent.action.SEND \ --es android.intent.extra.TEXT "$(echo -e 'Hi\nHow')" \ -t text/plain \ com.tengu.sharetoclipboard
For termux
am start -a android.intent.action.SEND \ --es android.intent.extra.TEXT "$(echo -e 'Hi\nHow')" \ -t text/plain \ com.tengu.sharetoclipboard
Sorry, something went wrong.
No branches or pull requests
Context
I know that I can use the following command to copy a string to the clipboard
I also know that when the string has a space character, the space character needs to be escaped
Now, I want the string to have a newline character. I've tried the following commands with no avail.
Any ideas on how to make the newline character to be inserted in the clipboard?
System information
PS: I referenced this issue in this comment at Stack Overflow.
The text was updated successfully, but these errors were encountered: