1

How can I erase the - from clipboard?

I have a script:

#!/bin/bash
xclip -o | replace - "" | xclip

Bat this doesn't work So

replace \- "" take no effect

]$ uname -a
Linux localhost.localdomain 3.17.4-302.fc21.x86_64 #1 SMP Thu Dec 4 19:12:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

1 Answer 1

1

You could use tr -d:

$ xclip -o | tr -d "-" | xclip

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .