at line where it says
i don't think you are comparing each element of v. v is a pointer to an array. You may need to use something like v[counter], maybe in a nested loop.
I received a warning when I tried to compile my program that said:
warning: comparison between pointer and integer
Could you please explain to me what this means, and in what ways I could possibly fix this?
Thanks for your help! (2 Replies)
I have 2000 files named like "file-fr0000.log", "file-fr1999.log"...
I wanna generate the file names automatically in the following c shell script:
set fr = 0
while ($fr <= 1999)
grep "ENERGY" file-fr$fr.log > data.dat
@ fr = ( $fr + 1 )
end
The above will generate file names... (3 Replies)
Hi gurus, I need to call php function for fetching data from mysql but I dont want to move internal row pointer (IRP) forward. Or even get the actual IRP position then fetch data and move IRP back to remembered position. Function mysql_data_seek() is not suitable for my example because I am trying... (1 Reply)
Hi guys :D
I am still playing with my C handbook and yes, as you can see I have small problem as always :cool:
I wrote a C code
#include <stdio.h> #define MESSAGE 100 int main(void) { char input_mes - Pastebin.com
And when I try to compile it I get following errors from gcc
... (1 Reply)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here.
I have following script (called out_to_streams.csh):
#!/bin/tcsh -f
echo Redirected to STDOUT > /dev/stdout
echo Redirected to... (2 Replies)
Hello.
Following recommendations for one of my threads, this is working perfectly :
#!/bin/bash
CNT=$( grep -c -e "some text 1" -e "some text 2" -e "some text 3" "/tmp/log_file.txt" )
Now I need a grep success for some thing like :
#!/bin/bash
CNT=$( grep -c -e "some text_1... (4 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
LEARN ABOUT OSX
a64l
A64L(3) BSD Library Functions Manual A64L(3)NAME
a64l, l64a -- convert between 32-bit integer and radix-64 ASCII string
SYNOPSIS
#include <stdlib.h>
long
a64l(const char *s);
char *
l64a(long value);
DESCRIPTION
The a64l() and l64a() functions are used to maintain numbers stored in radix-64 ASCII characters. This is a notation by which 32-bit inte-
gers can be represented by up to six characters; each character represents a ``digit'' in a radix-64 notation.
The characters used to represent digits are '.' for 0, '/' for 1, '0' through '9' for 2-11, 'A' through 'Z' for 12-37, and 'a' through 'z'
for 38-63.
The a64l() function takes a pointer to a null-terminated radix-64 representation and returns a corresponding 32-bit value. If the string
pointed to by s contains more than six characters, a64l() will use the first six. a64l() scans the character string from left to right,
decoding each character as a 6-bit radix-64 number. If a long integer is larger than 32 bits, the return value will be sign-extended.
l64a() takes a long integer argument value and returns a pointer to the corresponding radix-64 representation.
RETURN VALUES
On success, a64l() returns a 32-bit representation of s. If s is a null pointer or if it contains digits other than those described above.
a64l() returns -1 and sets the global variable errno to EINVAL.
On success, l64a() returns a pointer to a string containing the radix-64 representation of value. If value is 0, l64a() returns a pointer to
the empty string. If value is negative, l64a() returns a null pointer and sets the global variable errno to EINVAL.
WARNINGS
The value returned by l64a() is a pointer into a static buffer, the contents of which will be overwritten by subsequent calls.
The value returned by a64l() may be incorrect if the value is too large; for that reason, only strings that resulted from a call to l64a()
should be used to call a64l().
If a long integer is larger than 32 bits, only the low-order 32 bits are used.
STANDARDS
The a64l() and l64a() functions conform to X/Open Portability Guide Issue 4, Version 2 (``XPG4.2'').
BSD August 17, 1997 BSD