Tag Info

New answers tagged

2

This is a locale problem. watch uses strtod(3), which is locale-dependent, to convert the argument to -n to a double. To fix the problem, you need to either specify the argument to -n with a different separator: watch -n 0,1 w Or change your locale to a setting where the period character is used for the decimal point: export LC_NUMERIC=en_US.UTF-8 watch ...


4

There exists several variants of a watch command, some that spawn a shell to interpret a command line made of the concatenation of the arguments passed to watch (with space characters in between). In those you can do: watch 'ls | shuf' same as: watch ls '|' shuf (those watch actually run: "/bin/sh", ["sh", "-c", "ls | shuf"] and are quite dangerous in ...


1

The commands watch and w have nothing to do with each other other than the first letter being equal. You cannot assume that a parameter for w is equally valid for watch. The watch command takes an integral number of seconds as the value for -n. Incidentally, I've also looked at the man page for w and I can't see any reference to a time period. I'm curious ...



Top 50 recent answers are included