Sponsored Content
Full Discussion: Finding patterns in a file
Top Forums Shell Programming and Scripting Finding patterns in a file Post 302428388 by kylle345 on Wednesday 9th of June 2010 04:32:03 PM
Old 06-09-2010
only for pairs

I want to set another parameter to also look at triplets but thats later on.

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Finding patterns through out all subdir

Hi all experts, here is a problem which i would appreciate ur expertise. I need to do this: Eg. Find a number: 1234567 which i dunno which file and which folder I do know which main folder it is in but it is hidden deep within a lot of subdir. Is it possible to find the file? + output... (4 Replies)
Discussion started by: unnerdy
4 Replies

2. Shell Programming and Scripting

finding and removing patterns in a large list of urls

I have a list of urls for example: Google Google Base Yahoo! Yahoo! Yahoo! Video - It's On Google The problem is that Google and Google are duplicates as are Yahoo! and Yahoo!. I'm needing to find these conical www duplicates and append the text "DUP#" in from of both Google and... (3 Replies)
Discussion started by: totus
3 Replies

3. Shell Programming and Scripting

Searching patterns in 1 file and deleting all lines with those patterns in 2nd file

Hi Gurus, I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Discussion started by: toms
4 Replies

4. Shell Programming and Scripting

Need help with awk tool - finding text between two patterns

This is regarding using awk tool to find lines matching between 2 patterns. cat file | awk '/pat1/,/pat2/' But it's not working as expected in the following case. If pat1 also comes after pat2 then it's matching whole file after pat1. e.g. # > cat -n file 1 First line... (3 Replies)
Discussion started by: anand_bh
3 Replies

5. Shell Programming and Scripting

Finding several patterns and outputting 4 lines after

I an trying to parse a file looking for pattern1, or pattern2, or pattern3 and when found print that line and the next 4 lines after it. I am using korn shell script on AIX and grep -A isn't available. (1 Reply)
Discussion started by: daveisme
1 Replies

6. Shell Programming and Scripting

Extract certain patterns from file.

Hi All, I tried extracting this pattern using grep but it did not work. What I have is a file which has contents like this: file:///channel/add-adhd.html file:///channel/allergies.html file:///channel/arthritis.html http://mail.yahoo.com/ http://messenger.yahoo.com/... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

7. Shell Programming and Scripting

Finding files which contains anyone from the given patterns

Hi All, I need help as i am not able to create shell script for a scenario. i have 3000 numbers and want to search all the files which contain anyone of the above pattern. the files are in folder structure. Thanks and Regards Rishi Dhawan (14 Replies)
Discussion started by: Rishi26
14 Replies

8. Shell Programming and Scripting

Find matched patterns and print them with other patterns not the whole line

Hi, I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
Discussion started by: redse171
3 Replies

9. Shell Programming and Scripting

Finding matching patterns in two files

Hi, I have requirement to find the matching patterns of two files in Unix. One file is the log file and the other is the error list file. If any pattern in the log file matches the list of errors in the error list file, then I would need to find the counts of the match. For example, ... (5 Replies)
Discussion started by: Bobby_2000
5 Replies

10. Shell Programming and Scripting

Bash - Find files excluding file patterns and subfolder patterns

Hello. For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Discussion started by: jcdole
2 Replies
cyradm(1)						      General Commands Manual							 cyradm(1)

NAME
cyradm - IMAP administrative client SYNOPSIS
/usr/bin/cyradm -file script /usr/bin/cyradm [-user user] host [port] OPTIONS
Execute commands from script Log in to the server as user Short form of -user user DESCRIPTION
The cyradm utility is a simple Tcl-based administrative client for the IMAP server. If invoked with a script, cyradm reads Tcl commands- from the file script and evaluates them. If invoked with host, cyradm runs in interactive mode, connecting to host on port port, authenticating, and then reading commands from the standard input and evaluating them. The port argument defaults to the standard IMAP port. The cyradm utility runs until the exit command is invoked or until it reaches end-of-file on its standard input. If the file is in the home directory of the user, cyradm evaluates the file as a Tcl script just before reading the first command from standard input, after connecting and authenticating to server. INTERACTIVE COMMANDS
The following commands are available only in interactive mode. In all commands, a mailbox or root of "." specifies the same mailbox used previously in that connection. The createmailbox (or cm) command creates a new mailbox named mailbox. The optional partition argument specifies the partition name on which to create the mailbox. The deletemailbox (or dm) command deletes the named mailbox. Since adminis- trators do not have implicit delete rights on all mailboxes, they may need to use setaclmailbox to give themselves delete rights before trying to delete a mailbox. The renamemailbox (or renm) command renames the named mailbox to newmailbox. The optional partition argument specifies the partition name on which to move the mailbox. The listmailbox (or lm) command returns a list of mailbox names matching the string pattern. If pattern is omitted, it defaults to "*". The optional reference argument specifies the reference name relative to which pattern is then interpreted. Two wildcard characters are defined in pattern. The "*" wildcard matches zero or more characters. The "%" wildcard is like the "*" wildcard except that it will not match the hierarchy separator, ".". For example, if "listmailbox user.foo.%" is specified, and the mailboxes "user.foo.bar" and "user.foo.bar.old" both exist, then "user.foo.bar" is listed, but "user.foo.bar.old" is not. In some cases, where "%" is used as the last character of a pattern, non-mailbox names are listed in parentheses. This indicates that the name is not actually a mailbox, yet there are sub-mailboxes underneath that name. For example, if "listmailbox user.foo.%" is specified, and the mailbox "user.foo.bar.old" exists, but "user.foo.bar" does not exist, then "(user.foo.bar)" is listed. The setaclmailbox (or sam) command modifies the access control list of the mailbox mailbox. One or more identifier-rights pairs may be given after mailbox, each sets the ACL for identifier to rights. Rights may be a set of access right letters: lookup (mailbox is visible to LIST/LSUB/UNSEEN commands) read (SELECT the mailbox, perform CHECK, FETCH, PARTIAL, SEARCH, COPY from mailbox) keep seen/unseen information across sessions (STORE SEEN option) write (STORE options other than SEEN and DELETED) insert (perform APPEND, COPY into mailbox) post (send mail to submission address for mailbox) create (CREATE new sub-mailboxes in any implementa- tion-defined hierarchy) delete (STORE DELETED option, perform EXPUNGE) administer (perform SETACL) or one of the following words: none "" read lrs post lrsp append lrsip write lrswipcd all lrswipcda The deleteaclmailbox (or dam) command modifies the access control list of mailbox. One or more identifiers may be specified, each identifier has its access control entry removed. The listaclmailbox (or lam) command returns a string containing the access control list of the mailbox mailbox. The setquota (or sq) command sets the limit on the quota root root to quota. The quota is one of the following: A single numeric value, limiting the use of storage to that value A list of one or more resource-value pairs, limiting the use of each given resource to the given numeric value. The IMAP server does not support resources other than storage. none, specifying no limits whatsoever The listquota (or lq) command returns a string listing the quotas on the quota root root. The listquotaroot (or lqr or lqm) command returns a string listing the quota roots and quotas on the mailbox mailbox. Same as the Tcl command exit. Close the connection and exit cyradm. COMMANDS FOR TCL SCRIPTS
The cyradm utility adds one command to the standard Tcl command set: The cyradm connect command opens a connection to host and creates a new Tcl command connection that may be used to invoke various operations on the connection. The host defaults to connection and port defaults to the standard IMAP port. The cyradm connect command returns its connection argument. Returns the name of the host that connec- tion is connected to. Authenticates the connection. Switches are: Log in to the server as user. Attempt a plain text password login if strong authentication fails. The argument is a Tcl script which is executed to obtain the login information; the script must return a list with two elements, the username and the password. Before executing the script, the authenticate command will replace %-sequences as fol- lows: Replaced with a single % Replaced with the hostname of the server Replaced with the value of the -user switch, or the empty string if the -user switch was not given Creates a mailbox on connection. Arguments are the same as for the interactive version of the command. Delete a mailbox on connection. Arguments are the same as for the interactive version of the command. Renames a mailbox on connection. Arguments are the same as for the interactive version of the command. Returns a list describing mailboxes on connection matching pattern. The optional reference argument specifies the reference name relative to which pattern is then interpreted. The -subscribed switch limits the returned mailboxes to those to which the user has subscribed. The returned value contains a list with one entry for each matching mailbox. Each entry is a list containing three elements, the name, a list of mailbox attributes, and the hierarchy delimiter. If there is no hierarchy delimiter, the third element is the empty string. Modifies an access control list on connection. Arguments are the same as for the interactive version of the command. Modifies an access control list on con- nection. Arguments are the same as for the interactive version of the command. Returns a list containing the access control list of the mailbox mailbox on connection. The returned list contains alternating identifier right pairs. Sets the limit on the quota root root on connection. Zero or more resource limit pairs may be specified, specifying the limit for each resource. Returns a list containing the quotas of the quota root root on connection. The returned list contains zero or more resource usage limit triplets. Returns a list containing the quota roots and quotas on the mailbox mailbox on connection. The returned list contains zero or more sublists; each sublist contains the name of a quota root followed by zero or more resource usage limit triplets. FILES
Configuration file for the IMAP server SEE ALSO
Commands: cyradm(1), deliver(8), imapd(8), imapquota(8), reconstruct(8) Files: imapd.conf(4) cyradm(1)
All times are GMT -4. The time now is 03:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy