Sponsored Content
Top Forums Shell Programming and Scripting Check if the text file has more than 2 characters Post 302745847 by AraR87 on Tuesday 18th of December 2012 07:56:51 AM
Old 12-18-2012
Thank you! Great...
It worked fine.. But this displaying the whole content..
Is there any way to display particular 13th field?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting specific characters from a text file

I'm extremely new to scripting and linux in general, so please bear with me. The class I'm taking gives virtually no instruction at all, and so I'm trying to learn everything off the web. Anyway, I'm trying to extract characters that follow after a specific pattern ( '<B><FONT FACE="Arial">' ) but... (3 Replies)
Discussion started by: livos23
3 Replies

2. Shell Programming and Scripting

Read text from a file between two characters..

I have a requirement where i have to read from a .sh file a text lying bet characters like 'SELECT' & ';'...Please help me out in this. I am new to shell scripting. (2 Replies)
Discussion started by: goutam_igate
2 Replies

3. Shell Programming and Scripting

Remove special characters from text file

Hi All, i am trying to remove all special charecters().,/\~!@#%^$*&^_- and others from a tab delimited file. I am using the following code. while read LINE do echo $LINE | tr -d '=;:`"<>,./?!@#$%^&(){}'|tr -d "-"|tr -d "'" | tr -d "_" done < trial.txt > output.txt Problem ... (10 Replies)
Discussion started by: kkb
10 Replies

4. Shell Programming and Scripting

How to check if the file has EBCDIC or ascii characters

Hi, is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies

5. UNIX for Dummies Questions & Answers

Help with deleting characters from text file

I have a text file that looks like this: I want to delete the last character of first column in all rows so that my output looks like this: Thanks a lot! (1 Reply)
Discussion started by: evelibertine
1 Replies

6. Shell Programming and Scripting

Using shell to replace characters in a text file

Can I just say, this is such a frustrating and yet enormously rewarding field of study. I'm in the middle of configuring GeekTool (Uh oh, stupid n00b) and I really only have one question. I'm using Automator to grab a RSS feed, having GeekTool continually run that application every 10 minutes,... (7 Replies)
Discussion started by: SomeTechGuy
7 Replies

7. UNIX for Dummies Questions & Answers

Any way to get rid of ^M characters in a text file using pr?

When I use vi to see what's in the file I get this: int add1(int x) {^M return x + 1;^M} ^Mint subtract1(int x) {^M return x - 1;^M} ^Mint double_it(int x) {^M return x * 2;^M} ^Mint halve_it(int x) {^Mreturn x / 2;^M} ^Mint main() {^M int myint;^M int result;^M ... (2 Replies)
Discussion started by: Nonito84
2 Replies

8. Shell Programming and Scripting

ESC[70G[ and ^M characters in text file

Hi, I have a text file which when I do a 'cat' on it looks like below with the OK’s showing in green and any FAIL showing in red. cat filename output: ===== MySQL Query Check ===== DB mpuser is alive. 733 = Expected 733 Tables. OK ] DB mpuser_wf is alive. 61 =... (6 Replies)
Discussion started by: bunti
6 Replies

9. UNIX for Dummies Questions & Answers

^H characters appear when opening text file using vi - RHEL

Version Info: $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) $ $ uname -a Linux stryker138 2.6.18-308.13.1.el5 #1 SMP Thu Jul 26 05:45:09 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux I redirected manpage of ksh command's output to a text file as shown... (6 Replies)
Discussion started by: kraljic
6 Replies

10. Shell Programming and Scripting

Remove all junk characters from a text file

I am using flatfile, in that flat file we are getting the junk chars 1)I21001f<82>^Me<85>!h49 Service Charge 2) I21001f‚ e...!h49 Service Charge please tell me how to remove all junk chars in unix scripts. (1 Reply)
Discussion started by: Talari
1 Replies
DOVEADM-SEARCH-QUERY(7) 					      Dovecot						   DOVEADM-SEARCH-QUERY(7)

NAME
doveadm-search-query - Overview of search queries for doveadm mailbox commands DESCRIPTION
Several doveadm(1) commands use a search_query in order to act only on matching messages. This manual page describes all SEARCH KEYS, which can be used in a search_query. Each search_query consists at least of one SEARCH KEY. Most of the SEARCH KEYS require an argument. All SEARCH KEYS are case-insensitive. The shortest valid search_query is ALL. For example: doveadm search ALL Multiple search query expressions will be combined with the AND operator by default. To find all messages that are new and greater than 50 kilobyte, one can use: doveadm search NEW LARGER 50k OR-ed SEARCH KEYS have to be written in parenthesis, when mixing ANDs and ORs. Shells commonly require escaping for parentheses. To find messages that were saved on the "13th of April 2007" AND have the Seen and/or Flagged flag set, one can use for example: doveadm search SAVEDON 2007-04-13 ( SEEN OR FLAGGED ) It's also possible to specify the mailbox, in which should be searched. Use either the keyword mailbox and the name of the mailbox or the keyword mailbox-guid and the mailbox's globally unique identifier in the search_query. To find all messages in the mailbox with the GUID "44f68b13ce97044b837f000035ca9452" use: doveadm search mailbox-guid 44f68b13ce97044b837f000035ca9452 ALL To list all deleted messages in the "Trash" folder use: doveadm search mailbox Trash DELETED SEARCH KEYS
The following search keys from the specification of IMAP version 4 revision 1 (see: RFC 3501, section 6.4.4) are supported: ALL Matches all messages. ANSWERED Matches messages with the IMAP flag Answered set. BCC pattern Matches messages, which contain pattern in the BCC field of the message's IMAP envelope structure. BEFORE date specification Matches messages with an internal date before date specification. BODY pattern Matches messages, which contain pattern in the body part. CC pattern Matches messages, which contain pattern in the CC field of the message's IMAP envelope structure. DELETED Matches messages with the IMAP flag Deleted set. DRAFT Matches messages with the IMAP flag Draft set. FLAGGED Matches messages with the IMAP flag Flagged set. FROM pattern Matches messages, which contain pattern in the FROM field of the message's IMAP envelope structure. HEADER field pattern Matches messages, which either have the named header field, when empty pattern was given. Or messages, where the given header field's value contains the specified pattern. KEYWORD keyword Matches messages with the given IMAP keyword (e.g. $Forwarded) flag set. LARGER size Matches messages that are larger than the specified size. MAILBOX name Matches messages in the mailbox with the specified name. MAILBOX-GUID guid Matches messages in the mailbox with the specified guid. NEW Matches messages, which have the IMAP flag Recent set but not the IMAP flag Seen. NOT search key Inverse matching - matches massages, where the search doesn't match the specified search key or its value. OLD Matches messages, which do not have the IMAP flag Recent set. ON date specification Matches messages whose internal date matches the given date specification. search key OR search key Matches messages where one of the OR-ed search keys matches. Note: IMAP4rev1 uses the syntax: OR search key search key RECENT Matches messages with the IMAP flag Recent set. SEEN Matches messages with the IMAP flag Seen set. SENTBEFORE date specification Matches messages with a Date: header before date specification. SENTON date specification Matches messages with a Date: header matching the given date specification. SENTSINCE date specification Matches messages with a Date: header matching or after the given date specification. SINCE date specification Matches messages whose internal date is within or after the given date specification. SMALLER size Matches messages with a size smaller than the given size. SUBJECT pattern Matches messages, which contain pattern in the SUBJECT field of the message's IMAP envelope structure. TEXT pattern Matches messages, which contain pattern in the message body. TO pattern Matches messages, which contain pattern in the TO field of the message's IMAP envelope structure. UID sequence Matches messages with the given UID(s). A sequence may be a single UID. Can be a sequence range, written as from:to, e.g. 100:125. As comma separated list of UIDs, e.g. 11,50,4. It's also possible to combine multiple sequences, e.g. 1,3,5,7,10:20. UNANSWERED Matches messages, which do not have the IMAP flag Answered set. UNDELETED Matches messages, which do not have the IMAP flag Deleted set. UNDRAFT Matches messages, which do not have the IMAP flag Draft set. UNFLAGGED Matches messages, which do not have the IMAP flag Flagged set. UNKEYWORD keyword Matches messages, which do not have the given IMAP keyword flag set UNSEEN Matches messages, which do not have the IMAP flag Seen set. DOVEADM SEARCH KEYS Additional search keys, provided by doveadm(1). SAVEDBEFORE date specification Matches messages, which were saved before date specification. SAVEDON date specification Matches messages whose save date matches the given date specification. SAVEDSINCE date specification Matches messages with a save date matching or after the given date specification. DATE SPECIFICATION
doveadm(1) supports a few additional date specification formats. They can be used anywhere, where a date specification value is obliga- tory. day-month-year Default IMAP4rev1 date format. day, the day of month: 1-31. month, the abbreviated month name: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov or Dec. year, four digits of year, e.g. 2007. For example the "13th of April 2007" will be represented as 13-Apr-2007. interval Combination of a positive integer number and a time unit. Available time units are: weeks (abbr: w), days (abbr: d), hours (abbr: h), mins (abbr: m) and secs (abbr: s). To match messages from last week, you may specify for example: since 1w, since 1weeks or since 7days. Unix timestamp A 10 digit Unix timestamp, seconds since the 1st of January 1970, 00:00:00 UTC. For example the "13th of April 2007" will be repre- sented as 1176418800. YYYY-MM-DD Extended ISO-8601 calendar date format. For example the "13th of April 2007" will be represented as 2007-04-13. SIZE
doveadm(1) provides also an additional size representation format. The following formats can be used anywhere, where a size value is obligatory. octets The message size in octets, as specified in the IMAP4rev1 specification. size The message size in B (byte), k (kilobyte), M (megabyte), G (gigabyte) or T (terabyte). To match messages, bigger than 1 megabyte, you may specify for example: larger 1M or larger 1024k. SEE ALSO
doveadm(1), doveadm-search(1) Dovecot v2.2 2011-11-24 DOVEADM-SEARCH-QUERY(7)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy