Skip to content

Tag: linux

Linux synchronization without polling

In principle what I want is very simple. Two executables ./read and ./write respectively read and write from a resource (let’s say a file). Using flock(2) it is easy to prevent race conditions between arbitrary invocations of ./read and ./write at arbitrary times. The requirement is that each invocation…

Strange output in shell script

I’m encountering a very strange thing while writing a shell script. Initially I have the following script. When I ran this script, every 60 seconds, I’ll see the $DATETIME,$FIELD1 values in my log file. What is very strange, is that every 30 seconds or so, after the first minute has passed, I&#821…

What is text syntax in ImageMagick

I use following code convert text to image what is x, y means in text x, y ‘string’? Answer Method 1 label: You can either use label: which provides a canvas large enough to hold your text – notice I didn’t provide a canvas size: Method 2 -annotate Or, you can use -annotate to write on…