Skip to content

bash: grep exact matches based on the first column

I have a .txt file like below: For example, I want to generate a subset with the IDs 4324321_A3 and 9342432 (based on the first column!). I tried the following command to find the exact matches: But when I use this line, I end up with a dataset like this: The problem is that the line that matches a part

Python ImportError while module is installed [Ubuntu]

I’d like to make a switch from Windows to Linux (Ubuntu) writing my python programs but I just can’t get things to work. Here’s the problem: I can see that there are quite the number of modules pre-installed (like numpy, pandas, matplotlib, etc.) in Ubuntu. They sit nicely in the /host/Pytho…

Mercurial clone russian symbols like ‘?’

I work in Linux Red Hat 4.1.2-48 from PuTTy where set encoding UTF-8(PuTTy).I installed mercurial 2.2.1 and his repository. In ‘hgrc’ file of repository encoding set UTF-8 like : In repository i have files, which names are in utf-8 encoding, and have russian symbols. When i go to repositories dire…

Clearing output of a terminal program in Linux C

I want to clear the output of a C program produced with printf statements. I want to clear only one line, for example: [source] [terminal] [I hope] I will “DDDDDDDDDDDDDD” line in write other string. I just want the above A, B, C sentences to left. Only clear D sentences to change the other senten…

Using the Universal Chess Interface

I’m planning on making a program that interfaces with a UCI chess engine. I’ve been doing some research on it, but I want to get a little more information before I get more in depth with it. I was wondering if any of you could provide a few example “exchanges” between a UCI engine and …

How does cmd > /dev/null 2>&1 work?

I’m reading up on redirecting data to /dev/null and so I tried a simple test: If I try this: However, if I do this: That last solution is the desired solution, but what is happening with this 2>&1? My research so far suggest that 2 represents stderr and 1 represents stdout. So if I read it that w…

open email address by linux command [closed]

It’s difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago. I want to make a scr…

Linux non-blocking sockets

Hello I want to implement non-blocking TCP sockets with an openSSL overlay. For now I use epoll, but isn’t there another methode (except poll or select)? Is it possible to associate a callback function to a descriptor? I read something about libaio, but I don’t know exactly what it can do… A…

How to set CLASSPATH in Linux to let java find jar file?

Under Linux I am trying to run a jar file as follows: while having CLASSPATH set to any of the following (the file is located at /home/user/plantuml.jar): In either case, no matter how I define CLASSPATH, the java command gives an error Unable to access jarfile plantuml.jar. What am I doing wrong here? Answer…