Sponsored Content
Top Forums Shell Programming and Scripting How to count the number of files starting with a pattern in a Directory Post 302541425 by atechcorp on Sunday 24th of July 2011 02:52:31 PM
Old 07-24-2011
Actually i forgot to mention but i already tried this... Smilie and it gave the following error:

"Argument list too long".

Can you help me with this ? Thanks so much for you reply!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count the number of files in a directory

Hi All, How do i find out the number of files in a directory using unix command ? (14 Replies)
Discussion started by: Raynon
14 Replies

2. Shell Programming and Scripting

nawk-how count the number of occurances of a pattern, when don't know the pattern

I've written a script to count the total size of SAN storage LUNs, and also display the LUN sizes. From server to server, the LUNs sizes differ. What I want to do is count the occurances as they occur and change. These are the LUN sizes: 49.95 49.95 49.95 49.95 49.95 49.95 49.95 49.95... (2 Replies)
Discussion started by: cyber111
2 Replies

3. Shell Programming and Scripting

count number of files in a directory

what's the script to do that? i want to only count the number of files in that directory, not including any sub directories at all (5 Replies)
Discussion started by: finalight
5 Replies

4. Shell Programming and Scripting

Count the number of occurrences of a pattern between each occurrence of a different pattern

I need to count the number of occurrences of a pattern, say 'key', between each occurrence of a different pattern, say 'lu'. Here's a portion of the text I'm trying to parse: lu S1234L_149_m1_vg.6, part-att 1, vdp-att 1 p-reserver IID 0xdb registrations: key 4156 4353 0000 0000 ... (3 Replies)
Discussion started by: slipstream
3 Replies

5. UNIX for Dummies Questions & Answers

Read directory files and count number of lines

Hello, I'm trying to create a BASH file that can read all the files in my working directory and tell me how many words and lines are in that file. I wrote the following code: FILES="*" for f in "$FILES" do echo -e `wc -l -w $f` done My issue is that my file is outputting in one... (4 Replies)
Discussion started by: jl487
4 Replies

6. Shell Programming and Scripting

perl script on how to count the total number of lines of all the files under a directory

how to count the total number of lines of all the files under a directory using perl script.. I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Discussion started by: adityam
5 Replies

7. UNIX for Dummies Questions & Answers

Count number of files in directory excluding existing files

Hi, Please let me know how to find out number of files in a directory excluding existing files..The existing file format will be unknown..each time.. Thanks (3 Replies)
Discussion started by: ammu
3 Replies

8. Shell Programming and Scripting

How to count number of files in directory and write to new file with number of files and their name?

Hi! I just want to count number of files in a directory, and write to new text file, with number of files and their name output should look like this,, assume that below one is a new file created by script Number of files in directory = 25 1. a.txt 2. abc.txt 3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies

9. Shell Programming and Scripting

Count the number of subset of files in a directory

hi I am trying to write a script to count the number of files, with slightly different subset name, in a directory for example, in directory /data, there are a subset of files that are name as follow /data/data_1_(1to however many).txt /data/data_2_(1 to however many).txt... (12 Replies)
Discussion started by: piynik
12 Replies

10. Shell Programming and Scripting

Count number of pattern matches per line for all files in directory

I have a directory of files, each with a variable (though small) number of lines. I would like to go through each line in each file, and print the: -file name -line number -number of matches to the pattern /comp/ for each line. Two example files: cat... (4 Replies)
Discussion started by: pathunkathunk
4 Replies
smfi_setmlreply(3N)													       smfi_setmlreply(3N)

NAME
smfi_setmlreply() - sets default SMTP error reply code to a multi-line response SYNOPSIS
PARAMETERS
ctx Specifies the opaque context structure. rcode Specifies the 3-digit (RFC 821/2821) SMTP reply code, as a null-terminated string. rcode must not be a NULL value, and must be a valid or reply code. xcode Specifies the extended (RFC 1893 or 2034) reply code. An xcode must conform to RFC 1893/2034 code. If xcode is set to NULL, an extended code is not used. Specifies the remaining arguments, which are single lines of text. A maximum of 32 arguments can be specified. These arguments are used as the text part of the SMTP reply. The list must be termi- nated with a NULL value. DESCRIPTION
The routine directly sets the SMTP error reply code for a connection. Only and replies are accepted. The list of arguments in must be terminated with a NULL value. is used on subsequent errors from the filter. can be called from any of the functions other than Notes o Values passed to are not checked for standards compliance. o The message parameter must contain only printable characters; other characters may lead to undefined behavior. For example, a CR or LF will cause the call to fail, single (percentage) characters will cause the text to be ignored. If a is required in a string, use the format. o For more information on reply codes and their meanings, see RFC 821, 2821, 1893, and 2034. o If the reply code, that is, rcode, is given a code but is used for the message, the custom reply is not used. Similarly, if rcode is given a code but is used for the message, the custom reply is not used. In neither of the last two cases, an error is returned to the Milter and silently ignores the reply code. o If the Milter returns and sets the reply code to '421', the SMTP server terminates the SMTP session with a '421' error code. RETURN VALUE
fails and returns for the following reasons: o Invalid rcode or xcode argument value. o Memory-allocation failure. o Carriage return or line feed in a text line. o Length of any text line is more than the value(980). o More than 32 lines of text replies are provided. returns on successful completion. EXAMPLES
Consider the following sample code: The following is the SMTP response of the sample code: AUTHOR
The routine was developed by the Sendmail Inc. SEE ALSO
smfi_getsymval(3N), smfi_getpriv(3N), smfi_setreply(3N), smfi_setpriv(3N). on smfi_setmlreply(3N)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy