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...
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...
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.
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.
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...
:%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 [ [^\...
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...
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...
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.
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 " "
Can anyone help me here?
I tried
awk '{if ($NF=="\\") {$NF= " ";printf("%s",$0);} else {print}}' file
but it is...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.