New answers tagged

0

The example you found in a book show that you can write on your own and other terminals screen at the same time. Login two times on the same server and run wand you get something like: $ w USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT joe pts/1 :0 21:53 0.00s 0.04s 0.00s w joe pts/2 :0 22:38 3.00s 0.01s 0.01s /bin/bash At ...


3

You can perhaps do what you want using bash's readline with -i which provides an initial input to -e edit. For example, using date rather than ls as it is simpler to see: $ read -ei "$(date)" && $REPLY Mon Jul 25 13:42:47 CEST 2016 You now have the string Mon Jul 25 13:42:47 CEST 2016 as shown with the cursor at the end. You can edit this using ...


1

How would I put the ls output inside the bash tty clipboard? If running in a desktop environment, I prefer using the X11 clipboard: somecommand | xclip -i This way, the output can be pasted on the command line with the means of your terminal emulator, using xclip -o and in every other application. If you're running inside a terminal multiplexer like ...


1

You can record everything a program displays on a terminal with script. This program comes from BSD and is available on most Unix platforms, sometimes packaged with other BSD tools, and very often part of the most basic installation. Unlike redirection, which causes the program to output to a regular file, this works even if the program requires its output ...


1

Since you know the contents of prompt_yes_no.sh you can edit them before including them, replacing the /dev/tty by, for example, stdout. Replace your source by source <(sed 's|/dev/tty|/dev/stdout|g' <$SH_PATH_SRC/prompt_yes_no.sh) or for older bash, use a temporary file, eg sed 's|/dev/tty|/dev/stdout|g' <$SH_PATH_SRC/prompt_yes_no.sh >/tmp/...


0

As long as you have Xorg running, it uses memory and CPU-time. There's one computer to share among all of the processes. If you omit the Xorg processes, there's more available resources for your application.


0

You need to be sure to have the correct read write permits on the device, you could see it with: $ls -l /dev/[serial device] I rely on the script you found and made some modifications. For the development systems I've used by now, they used to need: None parity and One stop bit Those values are the default ones in the script. So in order to connect,...


3

Not sure if this is the optimal way, but here is "a" way. First, identify which "screen" or "tmux" session has the device open: lsof -R $mountpoint The few things you need from this output is the PID of the process, and its PPID (assume you assign these to $PID and $PPID respectively). Next, check what child processes are running under this PID, this ...



Top 50 recent answers are included