Quantcast
Channel: Copy shell script output to clipboard - Stack Overflow
Browsing all 7 articles
Browse latest View live

Answer by jeshio for Copy shell script output to clipboard

With WSL2 and sudo you can use this:echo "What so ever..." | /mnt/c/Windows/System32/clip.exe

View Article



Answer by Markus Zeller for Copy shell script output to clipboard

If you do that on Windows 10 LXXS Ubuntu bash you can do following command, working also on WSL2.Copy from WSL to Windows Clipboardecho "What so ever..." | clip.exeThe other way around piping the...

View Article

Answer by Michael Martin for Copy shell script output to clipboard

echo prints a newline at the end as well. Incase anyone else hits the same issue, I used Mauro's approach but with the printf command so that it's just the string, no extra line:For Mac:printf...

View Article

Answer by Mau for Copy shell script output to clipboard

You can use pbcopy which is native for Mac OS.Try this command:echo "variable" | pbcopyit will copy the string "variable" into your clipboard.

View Article

Answer by paxdiablo for Copy shell script output to clipboard

That may depend on the environment you're using. With Gnome at least (I haven't tried the others but it may work), you can pipe your output as follows:echo 123 | xclipecho 123 | xclip -sel clipThe...

View Article


Answer by dogbane for Copy shell script output to clipboard

You can use the xclip command. echo hello | xclipInstructions for obtaining xclip are here.

View Article

Copy shell script output to clipboard

Is there any easy way to implement the copy to clipboard option from the output of a shell script ?

View Article
Browsing all 7 articles
Browse latest View live




Latest Images