0

When I try to use Linux watch with a command which returns color output, I get the error: segmentation fault (core dumped).

The command itself is the following:

watch --color --no-title --interval 1 ls\ --color

If I remove either --no-title or --color (from watch or ls), the error doesn't show up.

What can be the reason of the error?

Arch; watch from procps-ng 3.3.11; zsh 5.1.1; GNU bash 4.3.4.2

Shamaoke
  • 201
  • 3
  • 7

2 Answers2

0

Works like a charm.... Which watch package do you have?....

# watch -v
watch from procps-ng 3.3.9

# watch --help

    Usage:
     watch [options] command

        Options:
        [..]
          -c, --color            interpret ANSI color sequences
        [..]
          -t, --no-title         turn off header
        [..]
Alberto
  • 505
0

Removing and installing solved the problem for me:

sudo apt-get remove watch
sudo apt-get install watch

Note: the standard output of these operations give a false sense of "nothing has changed", but does actually fixes the issue.

AdminBee
  • 22,803
CharlesG
  • 101