Skip to content

Poco C++ Libraries: “Not found: mysql”

I am using poco-1.7.7 with MySQL. I am building with g++ on Ubuntu. Building, linking and running works fine. However, when a Data Session is created, an exception “Not found: mysql” is thrown: The mysql client is installed and is part of $PATH. Additional information: I am running Ubuntu using Do…

Function to search of multiple patterns using grep

I want to make a bash script to use grep to search for lines which have multiple patterns (case-insensitive). I want to create a bash script which I can use as follows: and it should get traslated to: I tried following bash script, but it is not working: The error is: Answer I think you can do a recursive fun…

grep case-insensitively for a string in a text file

I’m writing a Perl script but I don’t get a part of it. There’s a text file with host names, one per line. I need to search a second file with host names (a blacklist) for the hostname read from the first one. To be sage the search should be done case insensitive. My first approach was using…

Faster solution to compare files in bash

file1: and file2: I need find match file2 in file1 and print whole file1 + second column of file2 So ouptut is: My solution is very slow in bash: I am prefer FASTER any bash or awk solution. Output can be modified, but need keep all the informations (order of column can be different). EDIT: Right now it looks…

Generate raw binary from C code in Linux

I have been implementing just for fun a simple operating system for x86 architecture from scratch. I implemented the assembly code for the bootloader that loads the kernel from disk and enters in 32-bit mode. The kernel code that is loaded is written in C, so in order to be executed the idea is to generate th…

bash command XOR ^ anothercommand

In the example below: what’s the expected behaviour of the XOR operator in shell? So when we enter what triggers anothercommand to run (if it will execute at all)? Answer If you enter command ^ anothercommand, you are simply providing command with two arguments, ^ and anothercommand. There is no operato…