I have a string
Form this string, I want to extract
I am unable to do that with sscanf because of the space between the words. What else can I use?
#include <stdio.h>
char buf_2;
int
main()
{
char *buf_1 = "\\\\?\\whats going on";
sscanf(buf_1,... (4 Replies)
I need to match a float inside a very long string (about 5000 chars) with sscanf. (I trimmed the string in this example.) I can't seem to match all the chars that come before and after the float.
int main(void)
{
char A = "";
strcat(A, " hello world! WORD' name='5.3498' hello world! ... (1 Reply)
sscanf does not stop at the first "&". How can I extract "doe" ?
char A = "name=john&last=doe&job=vacant&";
char B = "last";
char C = "";
char *POINTER = strstr(A, B);
sscanf(POINTER + strlen(B), "=%s%*", C);
printf("%s\n", C); // doe&job=vacant& (2 Replies)
How can I separetely extract the string and int after "dribble" ? (sscanf must limit TEXT to 9 chars to avoid buffer overflows.)
How come this code does not work with "dribbletext08" but does with "dribbletext05" ?
int main(void)
{
char TEXT = "";
int NUMBER = 0;
... (2 Replies)
Hi with the following code
int a, b;
while ((n = readline (connfd, buf, sizeof(buf)-1)) > 0)
{
buf = '\0';
if (sscanf(buf,"%d %d",&a,&b) != 2)
snprintf (buf, sizeof(buf), "data error\r\n");
else
{
printf("\nRecvd %d and %d",a,b);
... (1 Reply)
Hello, I have formatted lines delimited by colon ":", and I need to parse the line into two parts with sscanf() with format specifiers.
infile.txt:
Sample Name: sample1
SNPs : 91
MNPs : 1
Insertions : 5
Deletions ... (13 Replies)
Discussion started by: yifangt
13 Replies
LEARN ABOUT DEBIAN
bb-findhost.cgi
BB-FINDHOST.CGI(1) General Commands Manual BB-FINDHOST.CGI(1)NAME
bb-findhost.cgi - Xymon CGI script to find hosts
SYNOPSIS
bb-findhost.cgi?host=REGEX
DESCRIPTION
bb-findhost.cgi is invoked as a CGI script via the bb-findhost.sh CGI wrapper.
bb-findhost.cgi is passed a QUERY_STRING environment variable with the "host=REGEX" parameter. The REGEX is a Posix regular expression (see
regex(7) ) describing the hostnames to look for. A trailing wildcard is assumed on all hostnames - e.g. requesting the hostname "www" will
match any host whose name begins with "www".
It then produces a single web page, listing all of the hosts that matched any of the hostnames, with links to the Xymon webpages where they
are located.
The output page lists hosts in the order they appear in the bb-hosts(5) file.
A sample web page implementing the search facility is included with bbgen, you access it via the URL /bb/help/bb-findhost.html.
OPTIONS --env=FILENAME
Loads the environment from FILENAME before executing the CGI.
FILES
$BBHOME/web/findhost_header
HTML header file for the generated web page
$BBHOME/web/findhost_footer
HTML footer file for the generated web page
$BBHOME/web/findhost_form
Query form displayed when bb-findhost.cgi is called with no parameters.
ENVIRONMENT VARIABLES
BBHOSTS
bb-findhost.cgi uses the BBHOSTS environment variable to find the bb-hosts file listing all known hosts and their page locations.
BBHOME Used to locate the template files for the generated web pages.
SEE ALSO bbgen(1), bb-hosts(5), hobbitserver.cfg(5)Xymon Version 4.2.3: 4 Feb 2009 BB-FINDHOST.CGI(1)