0
votes
0answers
18 views

How to clean up output from `watch git gc`?

git gc updates the output as it runs, perhaps using backspaces, control characters, and/or curses. (I'm not an expert on this.) How can I modify my watch -n 60 git gc bash command so that the output ...
0
votes
2answers
436 views

How do I use the watch and jobs commands together in Bash?

How do I use the watch command with jobs command, so that I can monitor when a background job is finished? I execute it as follows, but I do not get the output from jobs: watch jobs If I run jobs ...
0
votes
2answers
642 views

Run two watch commands simultaneously

I want to run two executables in the foreground by typing one line of code or running a shell script. These executables watch a directory and recompile some code while outputting their status to ...
0
votes
2answers
314 views

Changing terminal size affects the output of grep inside a watch command

If I run a command like: watch "ps -ef | grep '^foo.*bar'" and the matching output line of ps -ef is a long line like foo <lots and lots of text here> bar whether this line is output is ...
2
votes
2answers
1k views

Using the watch command with an argument that contains quotes

I'm trying to get watch to work correct with commands that contain quotes, and the watch man page isn't very detailed about how quotes work. To give a concrete example, how can I run the following ...
1
vote
1answer
160 views

How can I fix a problem with standard error screwing up the output of watch?

Specifically, I am trying to run the following command on both CentOS and Fedora14 (same issue with both) watch sudo jmap -heap 31945 However, there are a few lines of standard error that screw up ...
21
votes
2answers
4k views

Using watch with pipes

I'd like to run this command: watch -n 1 tail -n 200 log/site_dev.log | grep Doctrine But it does not run, because "I think" that the grep tries to run on the watch instead of the tail... Is there ...
22
votes
4answers
7k views

bash watch command with colors preserved

From man watch: Non-printing characters are stripped from program output. Use "cat -v" as part of the command pipeline if you want to see them. So how do I use cat -v if I want to see the ...