Skip to content

Mono and Array.Sort

How can I use Array.Sort(someArray) in Mono with the Monodevelop !? I’m using Mono 4.2.2 and Monodevelop 5.10. Did I has to import some namespace? Which one? Is there another method to use? I’ve been trying that and don’t works: Answer Array is in the System namespace and is included within …

Difference between printf and echo in Bash

Why printf prints 5 and echo prints 6 characters? Answer First sentence of entry for echo in the bash man page (emphasis mine): Output the args, separated by spaces, followed by a newline. First sentence of the man page entry for printf: Write the formatted arguments to the standard output under the control o…

write(2)/read(2) atomicity between processes in linux

I have a case where there are two processes which act on the same file – one as a writer and one as a reader. The file is a one line text file and the writer re-writes the line in a loop. reader reads the line. The pseudo code looks like this: Writer Process Reader Process After a while of

How to run linux without any DesktopEnvironment?

I have Manjaro installed on my system and for the Desktop Environment I have XFCE4 and for login manager LXDM everything works fine but when I try to change some of the lxdm-config option I can’t login to my user, the problem came from that I disable that option to shown the select session panel and aft…

using tr to strip characters but keep line breaks

I am trying to format some text that was converted from UTF-16 to ASCII, the output looks like this: The only text I want out of that is: So there is a line break “n” at the end of each line and when I use It is stripping the new line as well so all the text ends up in