Skip to content

Tag: linux

Print previous line if condition is met

I would like to grep a word and then find the second column in the line and check if it is bigger than a value. Is yes, I want to print the previous line. Ex: Input file Output Now, I want to search for BB and if the second column (2 or 0.1) in that line is bigger than 1,

eclipse CDT /usr/bin/ld: cannot find -l

this is my code : i installed libimobiledevice library and this is but why in configure CDT to use shared library like picture CDT error ? /usr/bin/ld: cannot find -llibimobiledevice Answer Under libraries add imobiledevice instead of libimobiledevice. When you use -lx, linker searches for libx.so. In your ca…

Compiling a program with limited library access

i want to compile a C program with gcc and glibc(or any other c library) but i want to limit the program access to certain functions for example program should not be compiled if it uses sockets or signal handling functions. any idea how i could do this?? by the way i want to use this on a simple programming

Equivalent for Linux’s “screen”

Is there anything similiar to Linux’s “screen”? What I want to do is launch console application created in Java. Then let’s say I want to execute command to the running application. For example I want to tell it to exit so I’ll tell it command ‘exit’. On Linux I can o…

Linux “screen” does not write results

I have an Ubuntu system running on a remote computer that I use for computations. On other machines whenever I want to run some time-consuming program I type: and execute my program in the resulting screen, say: The program in question writes some results to an output file. This works fine on other machines. …

Bash oneliner to rename filenames

I often would like to easily rename a bunch of files. I always have to struggle with find, grep, xargs and sed to simply to the job. I would like to understand how I can do a better job using PCRE Here my files: I would rename the dot files properly as I can do with this oneliner: However I