2
votes
1answer
324 views

How to cat <<'EOF' arbitrary text data from clipboard

I want to paste some text into a terminal and save it to a file without using an editor, but just 'cat'. But too long lines or tabs in text make it impossible to do so with a simple command like "cat ...
0
votes
1answer
112 views

Run hardcopy on a specific screen window

I'm trying to run screen to connect to a serial port. I want it to run a command, and then every 60 seconds I want to use hardcopy to write which is shown to a log file. So far I've done this: ...
2
votes
2answers
319 views

Screen run command, detach and get output

I am trying write a script which connects and runs command on /dev/ttyUSB0 after that gets the output. screen -d -m 'SCREEN COMMAND' -L /dev/ttyUSB0 But this does not create an output file. How ...
2
votes
3answers
604 views

Run a script after killing lxsession (xorg)

I am trying to run a program automatically within a bash script after killing the LXDE session. My script consists of: #!/bin/sh pkill lxsession; sh ...
1
vote
4answers
1k views

less emulate a TTY to preserve piped color output

When you pipe something through less, the program usually discards color codes because it's not outputting to a TTY. So you have to add --color=always to the options for it to work. ls -l ...
2
votes
3answers
618 views

Really annoying keyboard screw up when entering sqlplus

Often when using bash I am used to using the keys ^A and ^E to go to the beginning and end of line, and the arrow keys to move from character to character without erasing. Every now and then, I ...
0
votes
3answers
557 views

How can I inherit my aliases and file coloring in SSH shells?

I have noticed that sometimes a shell account that I access over SSH inherits the aliases and file type coloring from my home shell. How does this process occur? These shells are usually BASH but I ...
4
votes
5answers
221 views

How to prevent a process from executing in bash

The following command has been entered: sleep 12h; nuke-russia It was entered on one of the Debian's ttys. I would like to cancel the sleep without nuking anything. I don't want the nuke command to ...
5
votes
1answer
1k views

Socat and rich terminals (with Ctrl+C/Ctrl+Z/Ctrl+D propagation)

socat - exec:'bash -li',pty,stderr,ctty -> bash: no job control in this shell What options should I use to get fully fledged shell as I get with ssh/sshd? I want to be able to connect the shell to ...