In bash
echo ${!X*}
will print all the names of the variables whose name starts with 'X'.
Is it possible to get the same with an arbitrary pattern, e.g. get all the names of the variables whose name contains an 'X' in any position?
...
In my Operating Systems class we are looking to modify a Linux kernel with some simple system calls of our own in C.
What would be a good distro suited for this purpose? We don't need any frills, no GUI, a vanilla kernel, etc. The more basic the better.
...
I have this running:
if (open(PS_ELF, "/bin/ps -eLf|")) {
while (<PS_ELF>) {
if ($_ =~ m/some regex/) {
# do some stuff
}
}
}
If called locally, the loop runs just fine, once for every output line of ps -eLf
Now if the same script is called from Nagios via NRPE, PS_ELF does only contain one line (the first line outp...
I'm curious how many cycles it takes to change contexts in Linux. I'm specifically using an E5405 Xeon (x64), but I'd love to see how it compares to other platforms as well.
...
I am making use of AJAX on my site and I would like to show users progress of a file that is being downloaded by my server.
The download is done by script that outputs a percentage to the shell. I would like to pass this info back to the user using AJAX. How can I do this?
Thank you for any help and direction.
I hope your solutions do...
I have a project to do in school which is baffeling me... I am SSHing into a Solaris computer in the computer lab from my own Debian box via
ssh -Y name@***.cs.<school>
I can get in just fine, and the X11 seems to be working also. However, this peticular project requires us to find the window id of a netscape window via xwininfo and...
Hello,
I am running a long program in a remote machine, and I want to stop it, but my problem is that if I use the kill command then the program will exit without saving results. Normally what I do to finish the program is using ctrl c and in that case the program saves the results, but right now I am not in the machine that is running ...
New to Linux programming in general.
I am trying to communicate with a kernel module via shared memory, but cannot call the functions used in user apps such as shmget();
I have installed kernel-headers and kernel-devel, and included ,
to the kernel module source, but the headers do not contain any functions.
Is there a standard way of...
I have a Linux C++ application and I'd like to test an object pointer for validity before dereferencing it. However try/catch doesn't work for this on Linux because of the segmentation fault. How can this be done?
...
Hi,
I'm having this problem and I reached a deadlock, I would try anything I've reached a deadend. My problem goes like this:
I have a Perl/CGI script installed on Fedora 9 machine running apache2, this script have a config file which placed in the same directory, this config file has 777 permissions.
The script can't write to the fi...
I recently set up, for a learning exercise, an Ubuntu desktop PC with KDE 4.2, installed Eclipse and started to look for information on how to develop for KDE. I know there's KDevelop and will probably have a look at that at some time in the future. Right now, however, I don't have the correct headers and libraries for creating KDE appli...
I'm trying to capture key presses so that when a given combination is pressed I trigger an event.
I've searched around for tips on how to get started and the simplest code snippet I can find is in Python - I grabbed the code below for it from here. However, when I run this from a terminal and hit some keys, after the "Press a key..." st...
I have a file containing UNICODE-16 strings that I would like to read into a Linux program. The strings were written raw from Windows' internal WCHAR format. (Does Windows always use UTF-16? e.g. in Japanese versions)
I believe that I can read them using raw reads and the converting with wcstombs_l. However, I cannot figure what locale ...
In bash, how do I determine what sound card is installed? I'm trying to create a plugin for Rhythmbox, and I'd like to test for this in a configuration script.
Edit:
On my machine, I needed to use sudo to be able to use lspci and lsmod. @Quassnoi's answer using cat worked without extra privileges.
...
In Perl, I need to read the environment of other processes.
The script is running with root
privileges.
The script will be
running in both Linux and Solaris.
I would like a solution that's mostly platform agnostic, at least between Linux and Solaris. In Linux, examining the /env/<proc_id>/environ can get me the answer.
I would like ...
This is for an assignment I'm working on, and NO I'm not looking for you to just GIVE me the answer. I just need someone to point me in the right direction, maybe with a line or two of sample code.
I need to figure out how to set the priority of a file read operation from within my program. To the point:
server process receives a mess...
Any recommendations?
Dia and Vym come to mind, but they don't really fulfill the main requirement; i.e. to generate the SQL to create the ERD that I'm describing.
...
Where can I find the usage of these stuff?
Is there some books that cover them?
...
Is it possible via any Unix utility to read chunks of a remote file (like say 'head' does) instead of transferring the whole file ?
...
What is the equivalent of oradim on Linux?
Does Oracle even provide anything like that for Linux?
...