Anyone know of an equivalent to Mach-O’s two-level namespace symbol resolution in ELF/linux? I want code that links to lib+sym, not sym. I’m trying to do what could best be described as precompilation of what normally would be a JIT compilation. I’d like to get a compile time binding of symb…
Tag: linux
finding unique values in a data file
I can do this in python but I was wondering if I could do this in Linux I have a file like this I want to find all the different types of values in the 3rd column by a particular username lets say name 1. grep name1 filename gives me all the lines, but there must be some way to
Changing working directories in Linux shell in a C program
My goal is to write a C program that is like a basic shell for Linux. I have everything working except changing working directories. I have tried the system() for input strings for cd and nothing happened. I also tried chdir(“tokened string”) and also no luck. Anyone have any ideas? This is part o…
Determine programmatically if a program is running
In C, how can I find out programmatically if a process is already running on Linux/Ubuntu to avoid having it start twice? I’m looking for something similar to pidof. Answer You can walk the pid entries in /proc and check for your process in either the cmdline file or perform a readlink on the exe link (…
sed replace with hex
UTF-8 file test.txt: hex is sed s/A/B/g test.txt works sed s/x41/B/g test.txt does not work Some characters are unprintable so I must use their hex, A is just an example. Answer the shell preprocesses it, use single quotes.
CPAN giving all sorts of errors on ubuntu
I am just trying to run a simple perl program to import data from xml and export it to database. Use Mysql; did not work, so I used DBD::mysql instead after failing to get Mysql.pm from cpan. However, I am unable to install anything. I am trying to install xml parser module, but cpan gives these errors no mat…
Getting cannot allocate memory error
I am getting this error in my program… ulimit -a gives the output: The amount of memory I’m trying to protect is 60 MB. Can someone tell me what is the problem and how it can be solved? Answer Given the error message, you probably got an ENOMEM error, and looking at the error code, this does not n…
Echo to both stdout and stderr
I have a probably pretty easy beginner question: How do I echo from a shell script into both stdout and stderr? I know that I can echo to stderr echo “foo” 1>&2 but I need the output in both. I tried some Googling but nothing worked. Answer This should do it
Is there a MongoDB GUI desktop application for Linux? [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 7 years ago. Improve this ques…
How can I find the alpha shape (concave hull) of a 2d point cloud?
I am looking for an implementation that calculates alpha shapes in two dimensions. I am running ubuntu. I would prefer a command line utility for this task, but will also be fine with a python library. In Google I have found many implementations that calculate alpha shapes. But none of them output what I want…