You are not logged in.

#1 2016-05-21 13:10:17

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

How to I pipe the terminal output to a web paste service?

I read how to do it recently but spent 20 mins or so googling and can't find the simple solution. It was a short one I read.

I don't mean pipe the new terminal output but pipe the terminal output that has already been displayed because there are errors on the screen from plugging in my usb keyboard which I want to send to a service online since I can't copy and paste it on that computer.

Last edited by MarthaParkin (2016-05-21 13:11:03)

Offline

#2 2016-05-21 13:51:21

netadmin
Member
Registered: 2016-04-28
Posts: 45

Re: How to I pipe the terminal output to a web paste service?

You can do this with the script command.

script somefile.txt
...do some stuff in terminal
exit

This will result in all you terminal stuff being in somefile.txt that you can send to pastbin or wherever.

Offline

#3 2016-05-21 13:56:09

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: How to I pipe the terminal output to a web paste service?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2016-05-21 15:58:48

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: How to I pipe the terminal output to a web paste service?

What command would it be to paste the already printed text on the terminal since it isn't dependant on a command to trigger it so I want to send it after it printed of its own accord. It comes when I plug the usb keyboard in.

Last edited by MarthaParkin (2016-05-21 16:01:23)

Offline

#5 2016-05-21 16:15:36

progandy
Member
Registered: 2012-05-17
Posts: 5,196

Re: How to I pipe the terminal output to a web paste service?

Aren't these messages stored in the kernel buffer and readable with dmesg? If you really need to dump the visible terminal, you can try setterm:

setterm --file /tmp/tty1.dump --dump 1

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#6 2016-05-21 17:04:06

MarthaParkin
Member
Registered: 2016-03-19
Posts: 232

Re: How to I pipe the terminal output to a web paste service?

progandy wrote:

Aren't these messages stored in the kernel buffer and readable with dmesg? If you really need to dump the visible terminal, you can try setterm:

setterm --file /tmp/tty1.dump --dump 1

oh ye I guess. I forgot about dmesg. Will try.

Worked. Cheers.

Last edited by MarthaParkin (2016-05-21 17:14:45)

Offline

#7 2016-05-21 19:30:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: How to I pipe the terminal output to a web paste service?

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB