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 strongm 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. praywin

    how to debug these warnings

    Thanks guys, I guess I can avoid the error if I read it using the absolute path on the server than going through HTTP.
  2. praywin

    how to debug these warnings

    Oops sorry it should have been readfile(http://www.mysite.com/some/dir/abc.php)
  3. praywin

    how to debug these warnings

    I admit guys, my question doesn't have much details. Its a pretty simple code fragment readfile(/home/some/dir/abc.php) which I use to include a header in on a page. The file is in the proper place (its on the same server) and the script works well and doesn't have errors etc. (its been in...
  4. praywin

    how to debug these warnings

    Hi, I've been getting this error intermitently. It goes away with a reload but every couple of days I see this warning. Since it is not reproducible easily I haven't been able to track it down. Has anyone see such type of warnings? Any ideas how to go about debugging this? Warning...
  5. praywin

    check if input is a valid float number

    Thanks
  6. praywin

    Hi All, I am having problem with

    Thanks, It works fine now. Cheers, Pravin.
  7. praywin

    check if input is a valid float number

    Thanks. I used num=strtol(input,&endptr,0); if (endptr!=\'0') { // number is valid } else { //number is invalid } but it doesn't work. It gives the same result for any input.
  8. praywin

    Hi All, I am having problem with

    yes
  9. praywin

    check if input is a valid float number

    Hi, I want to check if the input is a valid float number. i.e. it should filter out 12..0 , abc , 12abc etc. I was trying to read in the input as a string but it didn't work that great. Please let me know if you know of some other way. Cheers, Pravin.
  10. praywin

    Hi All, I am having problem with

    Thanks . I don't have a conio.h file.
  11. praywin

    Hi All, I am having problem with

    Hi All, I am having problem with this piece of C code. I want to input two values. One is a char and another is a char * and I want to keep doing this in a while loop. However after the first iteration the program doesn't stop at the first scanf. Please help me out here. Thanks Pravin...
  12. praywin

    deleting a column in vi

    Thanks. I guess this should solve the basic problem of not having to exit vi. Cheers, Pravin.
  13. praywin

    deleting a column in vi

    :%s/ [^\ ]* / / Well again this works only for the example I gave. It won't work for the third or fourth column. However this is very valuable starging point :%s/ [^\ ]* / / The input can be represented as [^\ ]*[ [^\ ]* ]* (bad regexp I guess) So we somehow have to pick the n'th [ [^\...
  14. praywin

    deleting a column in vi

    Well .. it works for this example but I want a more generic solution where I can remove a column of data from a file I am editing in vi. Lets say no search pattern works. All you have is space " " separated data adfkj asdflkj wqeroiu adfk adsk qwep dai qwer oupu adsfu qwer cou wer...
  15. praywin

    deleting a column in vi

    Well its more like I am in the middle of a session in vi . I don't want to save the file, go to the shell, run awk and come back to vi for more editing. Lets say I am editing a file like this 1 Pravin - He loves ice creams 2 Rahul - He too loves ice creams Now I open it in vi and change it...
  16. praywin

    deleting a column in vi

    Hi, I want to delete a column from a file while inside a vi session. I know the awk solution I want to know if it is possible using vi. Cheers, Pravin.
  17. praywin

    merge multiple lines

    I also tried a bash solution while read line do echo $line done < infile but it gives the output abc bcdcde def efg fgh Any idea? Cheers, Pravin.
  18. praywin

    merge multiple lines

    Hi, I have a file like abc bcdcde def efg fgh I want awk to read it and print abc bcd cde def efg fgh i.e. substitute \ with &quot; &quot; Can anyone help me here? I tried awk '{if ($NF==&quot;\\&quot;) {$NF= &quot; &quot;;printf(&quot;%s&quot;,$0);} else {print}}' file but it is...
  19. praywin

    sort in awk

    Hi Vlad, The expected output is that it should print the input as it is and then print the totals. The totals should be sorted numerically on the first field. To achieve this. I add up the counter in the body and keep printing the lines as it is. In the END part I do all the post processing...
  20. praywin

    sort in awk

    Hi, Is there any way I can use sort inside awk. i.e. awk ' { if (NF==2) {ar[$2]+=$1}; print...

Part and Inventory Search

Back
Top