As I mentioned in post #3 above, this is not surprising. You will probably also find the same difference in the printf family of functions in libc on those systems (for C and C++ programs using printf(), fprintf(), sprintf(), etc.).
This User Gave Thanks to Don Cragun For This Post:
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Hello everybody,
I am having problem in converting byte array variables to Hexa String variables for Linux. I have done, converting byte array variables to Hexa String variables for Windows but same function doesn't work for linux. Is there any difference in OS ? The code for Windows is given... (2 Replies)
I have a simple csh-script on a Solaris Workstaion which invokes the bc calculator:
#!/bin/csh
set shz=2
set zshift=5
set shzp=`bc -l <<END \
scale = 3 \
-1. * $shz + $zshift \
END`
echo $shzp
The result ($shzp) in this case is 3 (-1*2+5). It works fine on Solaris 8.
... (2 Replies)
Hi,
I have an awk script which performs simple operations of variable assignments and finally printing the variables in custom form.
BEGIN {FS=OFS="\n"}
{
v1=substr($0,1,15)
v2=substr($0,16,200)
v3=substr($0,216,20)
print v1 "|" v2 "|" v3
}
The input file being processed... (2 Replies)
Hi All
The below is the script, if i supply the script with the argument -f then it will delete the tmp file . We are having 3 unix system out of that two system are processing this file only one system is not processing and the error showin is below the script ..
can you please help me
... (2 Replies)
Hi all,
For no particular reason, I would like to use awk on a file that contains multiple columns, but let's say only columns 1 and 2 have some text values, and the remainder of the line contains text that I would like to treat as one column, considering I have spaces as delimiter for the... (33 Replies)
Hi Gurus,
I hit a hard block in my script.
when using awk command with variable, I got different result.
Please see below:
my test file as below:
$ cat demofile.txt
filename-yyyy-abcd
filename-xxx-week-pass
filename-xxx-week-run
for testing purpose, I put 3 awk command in one script.... (7 Replies)
Greetings Experts,
We are migrating from AIX to RHEL Linux. I have created a script to verify and report the NULLs and SPACEs in the key columns and duplicates on key combination of "|" delimited set of big files. Following is the code that was successfully running in AIX.
awk -F "|" 'BEGIN {... (5 Replies)
Discussion started by: chill3chee
5 Replies
LEARN ABOUT DEBIAN
curl_mfprintf
curl_printf(3) libcurl Manual curl_printf(3)NAME
curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf,
curl_mvsprintf - formatted output conversion
SYNOPSIS
#include <curl/mprintf.h>
int curl_mprintf(const char *format, ...);
int curl_mfprintf(FILE *fd, const char *format, ...);
int curl_msprintf(char *buffer, const char *format, ...);
int curl_msnprintf(char *buffer, size_t maxlength, const char *format, ...);
int curl_mvprintf(const char *format, va_list args);
int curl_mvfprintf(FILE *fd, const char *format, va_list args);
int curl_mvsprintf(char *buffer, const char *format, va_list args);
int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args);
char *curl_maprintf(const char *format, ...);
char *curl_mvaprintf(const char *format, va_list args);
DESCRIPTION
These are all functions that produce output according to a format string and given arguments. These are mostly clones of the well-known C-
style functions and there will be no detailed explanation of all available formatting rules and usage here.
See this table for notable exceptions.
curl_mprintf()
Normal printf() clone.
curl_mfprintf()
Normal fprintf() clone.
curl_msprintf()
Normal sprintf() clone.
curl_msnprintf()
snprintf() clone. Many systems don't have this. It is just like sprintf but with an extra argument after the buffer that
specifies the length of the target buffer.
curl_mvprintf()
Normal vprintf() clone.
curl_mvfprintf()
Normal vfprintf() clone.
curl_mvsprintf()
Normal vsprintf() clone.
curl_mvsnprintf()
vsnprintf() clone. Many systems don't have this. It is just like vsprintf but with an extra argument after the buffer that
specifies the length of the target buffer.
curl_maprintf()
Like printf() but returns the output string as a malloc()ed string. The returned string must be free()ed by the receiver.
curl_mvaprintf()
Like curl_maprintf() but takes a va_list pointer argument instead of a variable amount of arguments.
To easily use all these cloned functions instead of the normal ones, #define _MPRINTF_REPLACE before you include the <curl/mprintf.h> file.
Then all the normal names like printf, fprintf, sprintf etc will use the curl-functions instead.
AVAILABILITY
These function will be removed from the public libcurl API in a near future. They will instead be made "available" by source code access
only, and then as curlx_-prefixed functions. See lib/README.curlx for further details.
RETURN VALUE
The curl_maprintf and curl_mvaprintf functions return a pointer to a newly allocated string, or NULL if it failed.
All other functions return the number of characters they actually outputted.
SEE ALSO printf(3), sprintf(3), fprintf(3), vprintf(3)libcurl 7.12 30 April 2004 curl_printf(3)