I have a csv file into which has crept some ^M dos line ends, and I want to get rid of them, as well as 16 spaces and 3 tabs which follow. Like, I have to merge that line with the next one down. Heres an offending record and a good one as a sample of what I mean:
"Mary had a ^M
little lamb", "Nursery Rhyme", 1878
"Ma...
I allocated some memory with anonymous mmap:
buff->addr = mmap(NULL, length, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS -1, 0);
fprintf(stderr, "allocated buffer: %p, %lu\n", buff->addr, (unsigned long)length);
then I'm writing to it using fd opened with O_DIRECT:
int fd = open(name, O_CREAT | O_TRUNC | O_WRONLY | O_DIRECT, 00300);
if(fd...
I'm making a shell script and I want to know if it's possible to write directly to the command line when the script is executed ?
Example :
user@localhost:/home/user$./script.sh
... output
... another output
... another output
... last output
user@localhost:/home/user$I want to write here on the command line
I don't want to "echo" so...
Trying to learn how to work with packages in Ubuntu (and have Gentoo experience). This command is already known:
(1) sudo apt-get install pkgname
Looking for counterparts of these:
(2) emerge -s pkgname
(3) equery files pkgname
(4) equery belongs filename
(5) cat /var/lib/portage world
Which useful (console) package commands do yo...
I'm wondering which Linux distribution would be best (i.e. introduces the least dependencies) when linking a binary that should work on as many distributions as possible against shared libraries.
I've done it on Ubuntu, but the list of dependencies is horrible. SDL introduces PulseAudio and whatnot. My next guess would be to use Debian ...
After stackoverflow answered my previous question on here about my Wiimote left/right click issue, Not only can I move the mouse cursor, I can now left/right click on things. I now have one more question.
What do I use in python to get the title of the current active window? After googling 'X11 Python Window Title', 'Linux Python Window...
In Ubuntu, for example, you can use Super-M to invert the screen colors (requires desktop effects, see [1]). Other OSes have similar abilities, although I'm not really concerned with anything other than Linux.
Which API should I look into if I want to write a simple program that, when run, inverts the screen colors?
The language that I...
Hi all,
I came across the bind address while trying to configure the mysql server. The details of why I want to configure the bind address is in the link below.
http://stackoverflow.com/questions/3540051/multiple-hostnames-and-multiple-privileges
Now, I wan to understand the purpose of the bind address. In the sense, is a bindi...
How to do "sudo apt-get install " on OSX?
...
Hi,
I want to use a linux command line tool from my Java program. I start the program and get the output using the Process class (http://download.oracle.com/javase/6/docs/api/java/lang/Process.html):
/**
* @param args
* @throws IOException
*/
public static void main(String[] args) throws IOException {
Process proc = Runtime....
I try fork child processes and wait them to die.I first fork N child processes and then wait in a loop. But it seems it doesn't wait the child processes to die.It exits the loop altough the childs do not die. Here's my code:
void DistributorSubsystem::Start()
{
Application::instance().logger().information("Distributor Subsytem s...
Hello,
I've got a bug with UTF-8 normalizations:
as far as I understood, there's (at least) two ways to write an 'é' in UTF-8 : CC 81 and C3 A9.
[After a migration from Mac/OSX to a PC/Linux] I now have a conflict between the paths I store in my database and the actual file system structure, which prevents me from accessing correctly...
what is the equivalent of dumpstabs -s solaris command in linux?
Regards
ven
...
Hello
There's a proprietary application that I need that is packaged within a live ISO based on Ubuntu 9.10, so I'd like to try and transplant it into a Ubuntu 10.04 ISO and add/remove applications and drivers.
I have no idea if it's going to work, but in any case, I need an application that I would launch before running the proprietar...
Linux has a feature called namespaces, which let you give a different "view" of the filesystem to different processes. In Windows terms, this would be useful for example if you had a legacy program "floyd" that always loaded its configuration from C:\floyd\floyd.ini. If Windows had namespaces, you could write a wrapper script which wou...
We are trying to automate an aplication that lives in a mixed windows-linux environment. We need a test automation tool that supports both environments. Any recommendations?
We are evaluating SeeTest (www.experitest.com) that claims to be capable of supporting both Linux and Windows .
Does anyone have any experience using it for such...
Hi I need to add the following line to the end of a config file:
include "/configs/projectname.conf"
to a file called lighttpd.conf
I am looking into using sed to do this, but i cant work out how to only insert it if the line doesnt already exist. Is anyone able to enlighten me?
Thanks in advance,
Ben
...
Does any know a good Bluetooth framework that works on Linux not under GPL?
...
Hi ,
i'm about to port very large scale application to 64 Bits,
i've noticed in that in the web there some articles which shows
many pitfalls of this porting ,
i wondered if there is any tool which can assist in porting to 64 bit , meaning
finding the places in code that needs to be changed.... maybe the gcc with warnnings enabled.....
I´am with a problem for search a file on a linux server, i try to read a directory but i can´t set permission for the script on php read that directory.
The problem is not the permission by himself, because i set chmod -R 777 [file] and this don´t work, for make the problem worse that directory is a link to another directory so i don´t k...