Sponsored Content
Top Forums Shell Programming and Scripting Extract the string between 2 delimiters Post 303044298 by bob123 on Tuesday 18th of February 2020 09:28:11 AM
Old 02-18-2020
thanks for reply


that just prints bob


need to print to line above as in post one
 

10 More Discussions You Might Find Interesting

1. Solaris

To extract everything between two delimiters

My input file looks like " @$SCRIPT/atp_asrmt_adj.sql $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls start $SCRIPT/cim1020d.sql;^M spool $DATA/cim1021m.sql @$DATA/cim1021m.sql ! rm $DATA/cim1021m.sql spool $DATA/cim1021m.sql... (1 Reply)
Discussion started by: dowsed4u8
1 Replies

2. UNIX for Advanced & Expert Users

extract text b/w two delimiters

I have an input file which looks like " @$SCRIPT/atp_asrmt_adj.sql $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1005w.pls $SCRIPT/dba2000.scr -s / @$SCRIPT/cim1006w.pls start $SCRIPT/cim1020d.sql;^M spool $DATA/cim1021m.sql @$DATA/cim1021m.sql ! rm $DATA/cim1021m.sql spool $DATA/cim1021m.sql... (6 Replies)
Discussion started by: dowsed4u8
6 Replies

3. Shell Programming and Scripting

how to extract values b/w two delimiters

Hi, Please help me to extrat values b/w two delimiters. $ echo $abc i want to extract the value 12345 b/w %. (5 Replies)
Discussion started by: tsaravanan
5 Replies

4. Shell Programming and Scripting

sub-string extract between variable delimiters

I need to extract certain pieces from a string, wher delimiters may vary. For example A0 B0 C0 12345677 X0 Y0 Z0 A1-B1 C1 12345678 X1 Y0 Z0 A1/B2 C77 12345679 X2 Y0 Z0 I need to get C0 12345677 X0 C1 12345678 X1 C77 12345679 X2 I tried sed, see example below: echo 'A0 B0... (2 Replies)
Discussion started by: migurus
2 Replies

5. Shell Programming and Scripting

Getting a string without fixed delimiters

I have a line of text for example aaaa bbbb cccc dddd eeee ffffff I would need to get the cccc however bbbb could be there or not. So whether bbbb is in the line or not I need cccc. I was looking at either awk or sed....and trying to start at c and end until the next space. Also... (11 Replies)
Discussion started by: bombcan1
11 Replies

6. Shell Programming and Scripting

Extract strings within XML file between different delimiters

Good afternoon! I have an XML file from which I want to extract only certain elements contained within each line. The problem is that the format of each line is not exactly the same (though similiar). For example, oa_var will be in each line, however, there may be no value or other... (3 Replies)
Discussion started by: bab@faa
3 Replies

7. Shell Programming and Scripting

How to Replace string between delimiters?

Basically , i want to delete strings of a particular pattern from the flat file which is " | " pipe delimited. Below are the valid formats : 1) AAA (0) 111-111-111, AAA, BB 2) AAA (0) 111-111-1111;X, AAA, BB original flat file example : |ABC ABC XHAMK|AAA (0) 111-111-111, AAA,... (3 Replies)
Discussion started by: Ravi_007
3 Replies

8. Shell Programming and Scripting

Extract value between the delimiters and replace it with another value

Hi All, i have file name like below ABC_065224_123456_123456_your_130413_163005.txt ABC_065224_123456_MAIN_20130413_163005.txt ABC_065224_123456_123456_MAIN_130413_163005.txt ABC_065224_123456_123456_434567_MAIN_130413_163005.txt i need to find out the number of characters in the filed... (6 Replies)
Discussion started by: dssyadav
6 Replies

9. Shell Programming and Scripting

Skip the delimiter with in double quotes and count the number of delimiters during data extract

Hi All, I'm stuck-up in finding a way to skip the delimiter which come within double quotes using awk or any other better option. can someone please help me out. Below are the details: Delimited: | Sample data: 742433154|"SYN|THESIS MED CHEM PTY.... (2 Replies)
Discussion started by: BrahmaNaiduA
2 Replies

10. Shell Programming and Scripting

How to replace string between delimiters?

Hello, I would need to replace a delimiter in a flat file using.I would like to replace the semicolon (";") but only if it was contained in a string between quotes. For example: Original flat file example: abc;abc;"abc;abc";cd;"ef;ef";abc aa;bb;"aa";cc;"ddd;eee";ff Desired output:... (9 Replies)
Discussion started by: bartleby
9 Replies
DOVEADM-SEARCH(1)						      Dovecot							 DOVEADM-SEARCH(1)

NAME
doveadm-search - Show a list of mailbox GUIDs and message UIDs matching given search query. SYNOPSIS
doveadm [-Dv] [-f formatter] search [-S socket_path] search_query doveadm [-Dv] [-f formatter] search [-S socket_path] -A search_query doveadm [-Dv] [-f formatter] search [-S socket_path] -u user search_query DESCRIPTION
The search command is used to find matching messages. doveadm(1) will print the mailbox's guid and the message's uid for each match. When used with the -A or -u wildcard options, doveadm(1) will print the fields username, mailbox-guid and uid for each matching message. In the first form, doveadm(1) will executed the search action with the environment of the logged in system user. In the second form, the command will be performed for all users. In the third form, only matching mails of the given user(s) will be searched. OPTIONS
Global doveadm(1) options: -D Enables verbosity and debug messages. -f formatter Specifies the formatter for formatting the output. Supported formatters are: flow prints each line with key=value pairs. pager prints each key: value pair on its own line and separates records with form feed character (^L). tab prints a table header followed by tab separated value lines. table prints a table header followed by adjusted value lines. -v Enables verbosity, including progress counter. This command uses by default the output formatter flow (without the key= prefix). Command specific options: -A If the -A option is present, the command will be performed for all users. Using this option in combination with system users from userdb { driver = passwd } is not recommended, because it contains also users with a lower UID than the one configured with the first_valid_uid setting. When the SQL userdb module is used make sure that the iterate_query setting in /etc/dovecot/dovecot-sql.conf.ext matches your data- base layout. When using the LDAP userdb module, make sure that the iterate_attrs and iterate_filter settings in /etc/dovecot/dove- cot-ldap.conf.ext match your LDAP schema. Otherwise doveadm(1) will be unable to iterate over all users. -S socket_path The option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket. This allows an administrator to execute doveadm(1) mail commands through the given socket. -u user/mask Run the command only for the given user. It's also possible to use '*' and '?' wildcards (e.g. -u *@example.org). When neither the -A option nor -u user was specified, the command will be executed with the environment of the currently logged in user. ARGUMENTS
search_query Show messages matching this search query. See doveadm-search-query(7) for details. EXAMPLE
This example demonstrates how to search in user bob's dovecot mailboxes all messages, which contains the word "todo" in the Subject: header. doveadm search -u bob mailbox dovecot* subject todo 3a94c928d66ebe4bda04000015811c6a 8 3a94c928d66ebe4bda04000015811c6a 25 3a94c928d66ebe4bda04000015811c6a 45 The search command is mainly useful when used together with doveadm fetch command. For example to save message bodies of all messages from INBOX that have "todo" in subject, use: doveadm search -u bob mailbox INBOX subject todo | while read guid uid; do doveadm fetch -u bob body mailbox-guid $guid uid $uid > msg.$uid done REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail- able at: http://dovecot.org/bugreport.html SEE ALSO
doveadm(1), doveadm-fetch(1), doveadm-search-query(7) Dovecot v2.2 2010-11-25 DOVEADM-SEARCH(1)
All times are GMT -4. The time now is 02:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy