Hi all,
I am logging any access to a server, and i wanted to write a script which tells me how much entries there are.
The Problem is that
"wc -l log"
outputs the correct number of lines but with the name of the file attached.
is there any nice possibility to solve this that i ONLY... (3 Replies)
Hi,
I have a question here that need to get advise from all of you. Let say I have a set of data
12347777
12359899
12347677
12360090
12347688
12359979
12359009
12367022
12346677
I need to count the number that appear in each numbering ranges and the output is like below:
Prefix ... (5 Replies)
i have a string "dfasdfasdfadf"
i want to count the number of times each character is repeated..
For instance, d is repeated 4 times, f is repeated 4 times..
can u give a program in c (1 Reply)
I have a file with contents similar to this.
abcd
1234
4567
7666
jdjdjd
89289
9382
92
jksdj
9823
298
I want to write a shell script which count the number of lines that start with the number (disregard the lines starting with alphabets) (1 Reply)
Hey all,
I'm looking for a command that will search a directory (and all subdirectories) and give me a file count for the number of files that contain specific characters within its filename. e.g. I want to find the number of files that contain "-a.jpg" in their name.
All the searching I've... (6 Replies)
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
I have a script that outputs the weather on two lines.
If possibly I would like to set a character limit on them
Currently it outputs something like
but I would like to limit the lines so appends an ellipsis if nescessary:
This is the script
#! /bin/bash
curl -s --connect-timeout... (2 Replies)
Hi i have data like
abchd 124 ldskc aattggcc
each separated by tab space i want to count number of characters in 4th column and print it in new column with tabspace for every line can anyone help me how to do it.
Thanks. (3 Replies)
Hi, I need some help with this:
I'm making a script which does a couple of things with image files. The script is supposed to echo the number of each image it is processing like this:
Processing image1.jpgThe problem is with images with very long filenames, so I want to know how to limit the... (5 Replies)
Hello Friends,
Can somebody assist an issue I am having? I have a separate file with a list of account ids
XXX200B02Y01
XXX200B03Y01
XXX200B05Y01
XXX200B07Y01
XXX200B08Y01
I call the file, and run an egrep against a directory and logfiles
AccountID=$(cat... (2 Replies)
Discussion started by: liketheshell
2 Replies
LEARN ABOUT BSD
strcasecmp
STRING(3) Library Functions Manual STRING(3)NAME
strcat, strncat, strcmp, strncmp, strcasecmp, strncasecmp, strcpy, strncpy, strlen, index, rindex - string operations
SYNOPSIS
#include <strings.h>
char *strcat(s, append)
char *s, *append;
char *strncat(s, append, count)
char *s, *append;
int count;
strcmp(s1, s2)
char *s1, *s2;
strncmp(s1, s2, count)
char *s1, *s2;
int count;
strcasecmp(s1, s2)
char *s1, *s2;
strncasecmp(s1, s2, count)
char *s1, *s2;
int count;
char *strcpy(to, from)
char *to, *from;
char *strncpy(to, from, count)
char *to, *from;
int count;
strlen(s)
char *s;
char *index(s, c)
char *s, c;
char *rindex(s, c)
char *s, c;
DESCRIPTION
These functions operate on null-terminated strings. They do not check for overflow of any receiving string.
Strcat appends a copy of string append to the end of string s. Strncat copies at most count characters. Both return a pointer to the null-
terminated result.
Strcmp compares its arguments and returns an integer greater than, equal to, or less than 0, according as s1 is lexicographically greater
than, equal to, or less than s2. Strncmp makes the same comparison but looks at at most count characters. Strcasecmp and strncasecmp are
identical in function, but are case insensitive. The returned lexicographic difference reflects a conversion to lower-case.
Strcpy copies string from to to, stopping after the null character has been moved. Strncpy copies exactly count characters, appending
nulls if from is less than count characters in length; the target may not be null-terminated if the length of from is count or more. Both
return to.
Strlen returns the number of non-null characters in s.
Index (rindex) returns a pointer to the first (last) occurrence of character c in string s or zero if c does not occur in the string. Set-
ting c to NULL works.
4th Berkeley Distribution October 22, 1987 STRING(3)