07-27-2009
Quote:
Please help me, it's urgent!
This is not encouraged here.
I might have not understood your problem completely, please correct me if am wrong.
From what I have read from the question you have posted,
its dump data read from structure to a file
keep appending the data read from structure again
close the file
open it and read the data structure again ...
For all these you have libraries,
fopen - in append mode
fwrite
fclose
fread
10 More Discussions You Might Find Interesting
1. Programming
Hi gurus
I am not a C programmer but I need to read and write files on a computer on LAN using IP address.
Suppose on a computer that has an IP 192.168.0.2
Any help or code example. I did in JAVA using URL, but do not know how to do in ANSI-C.
In java:
-------
URL url = new... (3 Replies)
Discussion started by: lucky001
3 Replies
2. UNIX for Advanced & Expert Users
Hi All,
Not sure if this would be in a dummies sectiin or advanced. I'm looking for a script if someone has doen something like this.
I have list of files -
adc_earnedpoints.20070630.txt
adc_earnedpoints.20070707.txt
adc_earnedpoints.20070714.txt
adc_earnedpoints.20070721.txt... (1 Reply)
Discussion started by: thebeginer
1 Replies
3. UNIX for Dummies Questions & Answers
Hi my prob statement is to create a new file or to append to the 1tst file the followign chages.
File 1: txt file.
portfolio No a b c d
abc 1 Any Any Any charString
cds 2 values values values charString
efd 3 can can can charString
fdg 4 come come come charString... (4 Replies)
Discussion started by: szchmaltz
4 Replies
4. UNIX for Dummies Questions & Answers
Hi all,
I have the following shell script code which tries to sftp and writes the log into the log file.
TestConnection ()
{
echo 'Connection to ' $DESTUSERNAME@$DESTHOSTNAME
$SETDEBUG
if ]; then rm $SCRIPT ; fi
touch $SCRIPT
echo "cd" $REMOTEDIR >> $SCRIPT
echo "quit" >>... (10 Replies)
Discussion started by: valluvan
10 Replies
5. Shell Programming and Scripting
Hi All,
Please help me in writing data to a file in one row.
In database there is a column which contains large data which does not fit in the file in one row. The column contains list of paths. I want to write these paths to a file in one row.
Please find the code below writes :
... (2 Replies)
Discussion started by: rajeshorpu
2 Replies
6. Shell Programming and Scripting
Need to develop a unix shell script for the below requirement and I need your assistance:
1) search for file.log and file.bad file in a directory and read them
2) pull out "Load_Start_Time", "Data_File_Name", "Error_Type" from log file
4) concatinate each row from bad file as... (3 Replies)
Discussion started by: mlpathir
3 Replies
7. Programming
In the code below i try to write and read from a file, but i get unexpected results, like after writing i cannot open the file, and when reading the file the value entered earlier is not shown
bool creat_fragments(int nFragment)
{
int fd, rand_value;
char frag_path, buf;
for(int... (8 Replies)
Discussion started by: saman_glorious
8 Replies
8. Shell Programming and Scripting
Hi
I am trying to extract information out of a file but keep getting grep cant open errors
the code is below:
#bash
#extract orders with blank address details
#
# obtain the current date
# set today to the current date ccyymmdd format
today=`date +%c%m%d | cut -c24-31`
echo... (8 Replies)
Discussion started by: Bruble
8 Replies
9. Shell Programming and Scripting
Hi All,
Here is my requirement. I am grepping through the log files and cutting some fields from the file to generate a csv file. Now I have to check if 2nd field is having some fixed value then with the help of 4th field I have to look in same log and run another grep command to retrieve the... (11 Replies)
Discussion started by: kmajumder
11 Replies
10. Shell Programming and Scripting
Hello all
As part of my TUI - (line based) Text User Interface, i do have 2 commands to assist working with conf files.
Now, for me they work, but since i wrote them, i automaticly use them they way they should be used... you know what i mean. ;)
Anyway, they are designed to read 'simple'... (3 Replies)
Discussion started by: sea
3 Replies
ARPD(8) BSD System Manager's Manual ARPD(8)
NAME
farpd -- ARP reply daemon
SYNOPSIS
farpd [-d] [-i interface] [net ...]
DESCRIPTION
farpd replies to any ARP request for an IP address matching the specified destination net with the hardware MAC address of the specified
interface, but only after determining if another host already claims it.
Any IP address claimed by farpd is eventually forgotten after a period of inactivity or after a hard timeout, and is relinquished if the real
owner shows up.
This enables a single host to claim all unassigned addresses on a LAN for network monitoring or simulation.
farpd exits on an interrupt or termination signal.
Note: The program name farpd has been changed in Debian GNU/Linux from the original name (arpd) to avoid name clash with other ARP daemons.
The options are as follows:
-d Do not daemonize, and enable verbose debugging messages.
-i interface
Listen on interface. If unspecified, farpd searches the system interface list for the lowest numbered, configured ``up'' interface
(excluding loopback).
net The IP address or network (specified in CIDR notation) or IP address ranges to claim (e.g. ``10.0.0.3'', ``10.0.0.0/16'' or
``10.0.0.5-10.0.0.15''). If unspecified, farpd will attempt to claim any IP address it sees an ARP request for. Mutiple addresses
may be specified.
FILES
/var/run/farpd.pid
SEE ALSO
pcapd(8), synackd(8)
BUGS
farpd will respond too slowly to ARP requests for some applications. In order to ensure that it does not claim existing IP addresses it will
send two ARP request and wait for a reply. This slowness affects the nmap network scanning tool, and possibly others, which uses by default
ARP when scanning local networks. The answers from farpd will come after the tool has timeout waiting for the ARP replies and, consequently,
IP addresses claimed by farpd will not be discovered.
Additionally, farpd sends the ARP replies to the broadcast address of the network and not to the host that send the ARP request. Some systems
and applications (notably nmap) will not handled these requests and expect directed ARP replies (i.e. targeted specifically to the host that
sent the request and not to the network)
AUTHORS
Dug Song <dugsong@monkey.org>, Niels Provos <provos@citi.umich.edu>
August 4, 2001