OS: Kubuntu 18.04 or Ubuntu 18.04
I want to remove the first seven characters of certain strings I copy. For example, I want to first copy and then convert
1234567890
to
890
I can do so with the following code:
xsel -b -o | cut -c 8-
I can put the code into a simple script and can run that script successfully in a terminal.
#!/bin/bash
xsel -b -o | cut -c 8-
But that does not help to paste the modified contents into a GUI-based text file . So I assigned keyboard shortcuts to the code directly or to the corresponding script. But either way, nothing happens in Kubuntu 18.04 or in Ubuntu 18.04 when I press the assigned keyboard shortcut.
Even
#!/bin/bash
bash -c 'xsel -b -o | cut -c 8-'
does not work.
Why is that? Is is something peculiar to xsel (and to xclip which poses the same issue)?