AWK – print no newline
Using awk to display information, the print function, by default, adds newline after each iteration. I wanted to copy the results and use them as an actual array in a program and preferred to have them all on one line, …
Using awk to display information, the print function, by default, adds newline after each iteration. I wanted to copy the results and use them as an actual array in a program and preferred to have them all on one line, …
There was this website containing regularly updated content I wanted to follow. Unfortunately, they had no RSS feed available and I didn’t feel like checking on the website every now and then. Also, what I needed was just the posts …
Grep result to a shell variable – no line breaks Read more »
I’ve got a small home server made from a half-broken laptop nobody wanted any more. The screen was’t working, but otherwise the machine was fine, so I took it, shipped Centos 6 on it and it’s been serving as a …
It’s very convenient, even necessary, to use a version control system, e.g. CVS or Git. One can go back in history and easily trace the changes (especially) when something goes wrong. Git, being a distributed system, can be used to …
If you have an image with standard partitions, you can mount any partition as a loopback device using the offset given by fdisk: user@machine:/home/user# fdisk -l disk.img Disk disk.img: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total …
Some tasks you find yourself doing only once in a while, so they never stick in your memory for too long. Adding a new device to Observium (a great monitoring tool), and that device being off the premises, so it’s …
Following an upgrade in Debian Jessie/testing, I was left with no panels at all after logging into the MATE desktop. Running dpkg -s mate-desktop, I saw that MATE had been changed to 1.8 from the previous 1.6 version. My first …
It’s always best to commit your work only once it’s done. Sometimes the changes span over days or weeks and this is where stashing comes useful. Sometimes, however, I start work at the office and then I want to go …
Git – show all files modified between two commits Read more »
I am no big fan of cloud solutions, mainly because I don’t like to entrust my data to people I don’t know. But like with any other tool, the cloud is still just a tool and it really depends on …
I had this peculiar problem – one of my virtual hosts had a custom tmp directory where sessions were stored and not deleted for a long time. When I found out, the number of files in there already posed a …