Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by adev111

  1. adev111

    grep / sed question

    Here's what I came up with so far. awk '($4~/_(miss|HIT)\/200/){print $7}' NLANR-Logs.txt | grep -v "?" Any insights?
  2. adev111

    grep / sed question

    Hi, I change my text files here manually which have the data in the following format. 1085961616.474 172 190.104.253.84 TCP_MISS/200 2146 GET http://cfg.mywebsearch.com/mysaconfg.jsp?[07fiG10lKmU4M3R:IQ.TCH] - DIRECT/63.236.66.14 text/html 1085961622.602 60 68.22.217.209 TCP_HIT/200 9476 GET...
  3. adev111

    unable to set values in a struct print them and copy the struct

    Hello everyone, I am trying to store data in a struct. However it doens't set the values. I read from a text file the values below and I've also included my code for your review. I've removed the pointers from my structure. ===== NET09 1 -- NET10 1 -- ===== #include <stdio.h> #include...
  4. adev111

    copying structs

    Hi there, I have two structs where I am trying to copy from. typedef struct { char *netID[7]; int hopCount; char *nextHop[2]; }Routers; Routers one; Routers two; I read from file and set one.netID = something...
  5. adev111

    problem reading from a text file

    Actually I want to do more after reading. I want to be able to modify a particular record. My text file contents are: NET09 1 -- So after reading in the file if I find NET09 I want to replace 1 by a 2. In my code i have: routerD.hopCount=routerD.hopCount++; while...
  6. adev111

    problem reading from a text file

    Nevermind, I figured! Thanks
  7. adev111

    problem reading from a text file

    Acutally I tried it n it works. However it only reads the first line and exits? Can somebody help me print everything in the file? Thanks #include <sys/types.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include "se.h" int main() { char buff[10]; Routers routerD; int rdr...
  8. adev111

    problem reading from a text file

    Hi i have a text file that I am unable to read properly. Here's what I do. /* tblD.txt */ NET06 1 -- NET25 1 -- /* se.h */ typedef struct { char netID[7]; int hopCount; char nextHop[2]; }Routers...
  9. adev111

    write data to a pipe and read from pipes

    So in continuation with the current thread, here is what I am doing. Sending messages from routers B, A and C to Networks 54 and 02. And update routing tables. Consider this scenario B <--> NET54 <--> A <--> NET02 <-->C Initial Routing table for A Network HopCount NextHop NET02 1 --...
  10. adev111

    write data to a pipe and read from pipes

    Thanks for the heads up salem. I will be building a program that simulates behaviour similar to a router. I won't be dealing with real addresses but reading addressing info from text files and have different tables for all the links in the network. I think this post will serve as the base for my...
  11. adev111

    write data to a pipe and read from pipes

    Thanks for the pointers Salem. For the pipe() call, i do ... pipe(fd); ..... . Isn't that enough? where fd has the two ends of the pipe. i.e. 0 and 1
  12. adev111

    write data to a pipe and read from pipes

    Yes it is. Nobody is being asked to "do" it but only steer me in the right direction.
  13. adev111

    write data to a pipe and read from pipes

    Hi there, I need to: 1) Create a pipe, read data from a variable. Write this data to the pipe. Send a message two file2 that pipe is ready to be read. All this in one file 2)Another file which will display message "reading from pipe". Reads until it's done. to achieve this what I am trying to...
  14. adev111

    copy file from one server to another

    hi, could u please tell me if there is any similar (UNC)example. i googled it, but in vain!
  15. adev111

    copy file from one server to another

    Hi there, I have a windows service which should copy the file from one server to another. Suppose I created an xml file using xmltextwriter on server 1 location C:\tempp\test.xml, I want the service to copy this file to another server. say another servers C:\inetpub\wwwroot\foldername\. How am...

Part and Inventory Search

Back
Top