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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  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

    ...everything before http: and after .js or .jsp or .html or .gif it will leave me with only the urls. I am not so good at script syntax but here's what I've come up with so far. [code] grep "(_hit|MISS)/200)*.!\?*"log.txt -- [/code/ Would someone tell me what am I doing wrong? Thanks in advance
  3. adev111

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

    ...{ char netID[7]; int hopCount; char nextHop[2]; }Routers; FILE *fp; FILE *fp1; char arr[50]; Routers router1[5]; Routers router2[5]; fp = fopen("tblE.txt","r+"); for(loop=0;loop<5;loop++) {...
  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

    ...{if(strcmp(routerD.netID,"NET09")==0) { fseek(fp,-sizeof(routerD.netID),SEEK_CUR); fwrite(&routerD.hopCount,sizeof(routerD.hopCount),1,fp); }} /*So the modified text file contents will be: NET09 2 -- */ Would someone please advise. Thanks
  6. adev111

    problem reading from a text file

    Nevermind, I figured! Thanks
  7. adev111

    problem reading from a text file

    ...<unistd.h> #include <stdio.h> #include <stdlib.h> #include "se.h" int main() { char buff[10]; Routers routerD; int rdr; int loop = 0; FILE *fp; fp = fopen("tblD.txt","r"); rdr = fgetc(fp); /*read network ID*/ while((rdr == '\n') && (rdr != EOF)) rdr = fgetc(fp); if(rdr == EOF) return 0...
  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

    ...#define PIPE_RD 0 #define PIPE_WR 1 int main(void) { int fds[2]; pipe(fds); if(fork()){ /update the table for router B i.e. increment hop counts */ /* send message to A */ dup2(fds[1],STDOUT_FILENO); /* got message from B. Facilitate a way to send in "B" */ execlp("test2","test2",NULL)...
  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

    ...= fork()) == -1) { perror("fork"); exit(1); } if(childpid == 0) { /* Child process closes up input side of pipe */ close(fd[0]); /* Send "string" through the output side of pipe...
  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...
  16. adev111

    php+xml+css

    Hi there, I have a site that was done in JSP and XML earlier. But now it has to be done in PHP and XML on tomcat. I will need to provide authenticated security to the site as well for administrative purposes. Basically everything is xml driven. I have to be able to read from xml files, write...
  17. adev111

    reporting services-display GROUP total on a matrix column

    Hi there, I have a matrix which has a column group and a column group which displays the report like this: --------------------------------------------------- |_____|Population_________________________________| |_____|_GROUP1______________|Group two____________| |...
  18. adev111

    reporting services-problem displaying column break in a matrix

    Hi there, I have a matrix in which i want to display data in this manner: ________________________________________________________ |Store | Store1 | Store2 |WEST|Store3| Store4 | EAST | |------------------------------------------------------- |#OFprods| 45 | 43 | 88 | 43 | 54 |...
  19. adev111

    unable to see grouped data rows in a report

    Hi there, i have a report which generates grouped data. if i have one datarow for a group the datarow and group show up fine. but if i have more than one row for a data group it somehow skips the other rows and shows me the last row in the group. it works fine in the data view but not in the...
  20. adev111

    problem displaying group in a report

    hi I figured, you just drag the field into the group column!

Part and Inventory Search

Back
Top