I am trying to find a way to compare the contents of a flat file with a variable.
For example something like this:
if ${STRING} exists in /file.txt then ignore
else
add to file
I am...
Hi, this is a very easy but yet very difficult. Easy for those who already known.
I'm using VIM, in theory, VIM can formatt C++ code extremely well. For a single file, I have no problem (se...
I must resolve the problem of the 5 philosophers with semaphores in c++, using the system calls wait and signal. (must run on Linux). I can't find the error.
If philosophers 0 got chopsticks ...
I have a BASH script that creates a directory of the current date, downloads files via psftp into that current date directory, then creates a text file of the list of files in that current dat...
In my program, I need two different kind of timers, periodic timer and one-shot timer. I write the code in Attach Code Snippet. I get the output
--------------------------------------
Period...
When compiling code with make, I got the errors:
--------------------
make -C /lib/modules/`uname -r`/build modules M=$PWD
make: Entering directory `/usr/src/kernels/2.6.27.21-170.2.56.fc10...
Hello,
Can anybody help me out in setting the cron-job for every 2 weeks (on sunday), lets say I want run restart-server.sh script.
Can some one give exact format for this. like 0...
i implement a simple bash script as below:
#!/bin/sh
<scp command to copy folder to Server B >
<ssh remote restart mysql to Server B >
sleep3
<scp command to copy folder to Serv...
Hello experts..
I'm trying to narrow down a problem. I have a process running 24 threads in a thread pool. Operation is typical - whenever a message is available, one of these thre...
Hello!
My program make a SOCK_DGRAM connection but accept estrange connection. Its output:
accept 38248 95
accept 38249 95
accept 38250 95
accept 38251 95
accept 38252 95
...
I don't ...
Hello @ll,
i'm developing a linux kernel driver for data acquisition. My driver gets an address from user space and want to do a dma to this location. But my driver can't directly access th...
hi people
I was trying to compile a code using some
user defined shared libraries.
the name of the library he has kept is as
---------------------------------------------------
g++...
I have to write a script to tar and transfer about 20GB amount of data... I was planing to use the multi volume option in tar to create series of 1GB files and transfer individually. I can run...
To retrieve my own IP address on the network I use the grep command. $ /sbin/ifconfig eth0| grep 'inet addr:' However, I would like help/advice on how to write a small shell script that would...
I am trying to write a script that will tar files by date. My system is set up to archive certain files into a directory named with the date of the archive. For example: /data/archive/08-08-...
Hi,
I am trying to run fsck /dev/sdb and it would take a longtime to finish with the number of inodes.
I have tried the fsck -a/-p option, but there is unexpected inode table.
Now, i ...
Hi all,
all I want to do is to delete the string ') somestring' from
the string ' "a", "b", "c") somestring' using sed.
The count of the double quoted strings ist variable.
Cheers,
...
Must transfer files from LINUX to MS/2003 server via FTP. Have been trying to get basic scripts to work however appear to be issues with MS server not accepting the ID and PASSWORD. Can manu...
Hello, in Linux, how can I get the source port used by a socket after making a call to the connect system call? I want to save the source port used for later use.
Alternatively, how can I fi...
hi this is rajesh,
the following code is the dining philosophers problem.For that problem I want
answer for the following questions and I want to know why the de...
I'm running MythBuntu and I'm having no success getting the optical audio to work.
I can verify the hardware is all fine because it works in XP. In linux, I can get analog out from the stereo...
Hello!
I would like to do limit some resources per user and was searching for a tool, kernel patch or whatever to do it but was not able to find something.
Perhaps somebody knows how to ...
I'm trying to port an app from windows to linux, but I need a way to get the number of miliseconds since the system started. In windows this is the GetTickCount() function. I thought Linux d...
Hi Experts,
I want Linux Script with following specifications.
*Create Linux users.
usernames, passwords, home directories are in a seperate CSV (comma seperated file)configuration f...
# Goal
- Access Serial Port on a Linux (Ubuntu 9.4) machine with Php.
- The serial device is an usb serial converter chip "ft232r".
- The Receiver must always be online, because the timepo...