Sponsored Content
Full Discussion: Split command
Top Forums UNIX for Dummies Questions & Answers Split command Post 302780057 by siya@ on Wednesday 13th of March 2013 05:30:59 PM
Old 03-13-2013
Hi,
Sorry for the confusion!!

I want to basically convert ONLY the first column of my entire sequence
from

[
Code:
B]PH0100000[/B]0G0240                   to                       string0G0240
PH01000001G0190                   to                       string1G0190
PH01000002G0120                   to                       string2G0120

,....
....

PH01270000G0010                   to                       string270000G0010   
PH01278028G0014                   to                       string278028G0014   
PH012781040010                     to                       string278104G0010


With respect to code,why does it have {0,4 }in initial part?

I dint understand the part in code : awk 'match($1, /^PH010{0,4}/)
Please do advise.
ThanksSmilie

Last edited by siya@; 03-13-2013 at 06:50 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Problem in split command

I want to split a file containing millions of records. I am issuing the command split -l 20000 filename which will split the file in 20K records each. It works fine except in some files, data after one particular field is lost( the field with space). Say the record is ... (4 Replies)
Discussion started by: superprogrammer
4 Replies

2. Shell Programming and Scripting

Split command

Can anyone tell me what this command will do? split -b$SPLITSIZE - $file1 < $file2 Will it split file1 or file2? Please explain. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

3. UNIX for Advanced & Expert Users

Split Command options

HI! All iam using Split command to split a large .txt file in to smaller files, The syntax iam using split -25000 Product.txt iam getting four output files but not in .txt format but in some other format , when i checked the properties the Type of the output files is Type can any... (7 Replies)
Discussion started by: mohdtausifsh
7 Replies

4. UNIX for Advanced & Expert Users

Split Command in Perl

Hi, I have to split a line of the form 1232423#asdf#124324#54534#dcfg#wert#rrftt#4567 into an array in perl. I am using @fields; @fields=split('#',$line); if($fields eq "1") But this is not working. By using the syntax, the statements in "if" are never executed. Please help.... (9 Replies)
Discussion started by: rochitsharma
9 Replies

5. UNIX for Dummies Questions & Answers

filenames from split command

Is there an option or a way with the split command to rename the partitioned files with a counter. For example, can the files testaa, testab, testac be renamed to test1, test2, test3 from the split command without explicilty renaming files. Thanks, - CB (3 Replies)
Discussion started by: ChicagoBlues
3 Replies

6. UNIX for Advanced & Expert Users

split command

./myapp | split -b 10m -d -a 1 - "myappLog" here split command is reading the input from the output of myapp and it will write the text in to file where in each file size is 10MB and it will create upto 10 files. I have observed split is flushing the data for every 4096 bytes. if my... (7 Replies)
Discussion started by: arv600
7 Replies

7. UNIX for Dummies Questions & Answers

change split with another command

hi all, i have problem with my script in unix ...i have script with split -d (--numeric-suffixes) in linux its working but in solaris machine the option -d isn't have so how to i can change split -d (this output) will same in output solaris can i change with awk and how do that thx before (2 Replies)
Discussion started by: zvtral
2 Replies

8. Shell Programming and Scripting

Want to split awk command

Hi, There is an awk command in script and it is running successfully. I want to split that command in 2 lines. I have tried using '\' but its not working.. Please suggest me the solution. (11 Replies)
Discussion started by: Sanket Dalvi
11 Replies

9. UNIX for Beginners Questions & Answers

Urgent..!!Split command

Hi All, I want to split the file after size gets above 100kb. So I am using below command. split -b 100kb File.txt Test But after first file, my record is breaking as in middle of the record, size of file is getting above 100kb. So after splitting half record is in one file and half... (1 Reply)
Discussion started by: Amey Dixit
1 Replies

10. UNIX for Beginners Questions & Answers

Help with Split Command

Hi All, I have a txt file which I would like to partition into 2 separate output files. I would like to partition the odd or even groups of 4 lines from the txt file. So I would like lines 1-4 to go to file1, and lines 5-8 to go to file2, and so on until the whole txt file is divided into two... (1 Reply)
Discussion started by: landrjos
1 Replies
IMAP_SEARCH(3)								 1							    IMAP_SEARCH(3)

imap_search - This function returns an array of messages matching the given search criteria

SYNOPSIS
array imap_search (resource $imap_stream, string $criteria, [int $options = SE_FREE], [string $charset = NIL]) DESCRIPTION
This function performs a search on the mailbox currently opened in the given IMAP stream. For example, to match all unanswered messages sent by Mom, you'd use: "UNANSWERED FROM mom". Searches appear to be case insensitive. This list of criteria is from a reading of the UW c-client source code and may be incomplete or inaccurate (see also RFC2060, section 6.4.4). PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $criteria - A string, delimited by spaces, in which the following keywords are allowed. Any multi-word arguments (e.g. FROM "joey smith") must be quoted. Results will match all $criteria entries. o ALL - return all messages matching the rest of the criteria o ANSWERED - match messages with the \ANSWERED flag set o BCC "string" - match messages with "string" in the Bcc: field o BEFORE "date" - match messages with Date: before "date" o BODY "string" - match messages with "string" in the body of the message o CC "string" - match messages with "string" in the Cc: field o DELETED - match deleted messages o FLAGGED - match messages with the \FLAGGED (sometimes referred to as Important or Urgent) flag set o FROM "string" - match messages with "string" in the From: field o KEYWORD "string" - match messages with "string" as a keyword o NEW - match new messages o OLD - match old messages o ON "date" - match messages with Date: matching "date" o RECENT - match messages with the \RECENT flag set o SEEN - match messages that have been read (the \SEEN flag is set) o SINCE "date" - match messages with Date: after "date" o SUBJECT "string" - match messages with "string" in the Subject: o TEXT "string" - match messages with text "string" o TO "string" - match messages with "string" in the To: o UNANSWERED - match messages that have not been answered o UNDELETED - match messages that are not deleted o UNFLAGGED - match messages that are not flagged o UNKEYWORD "string" - match messages that do not have the keyword "string" o UNSEEN - match messages which have not been read yet o $options - Valid values for $options are SE_UID, which causes the returned array to contain UIDs instead of messages sequence numbers. o $charset - RETURN VALUES
Returns an array of message numbers or UIDs. Return FALSE if it does not understand the search $criteria or no messages have been found. EXAMPLES
Example #1 imap_search(3) example <?php $conn = imap_open('{imap.example.com:993/imap/ssl}INBOX', 'foo@example.com', 'pass123', OP_READONLY); $some = imap_search($conn, 'SUBJECT "HOWTO be Awesome" SINCE "8 August 2008"', SE_UID); $msgnos = imap_search($conn, 'ALL'); $uids = imap_search($conn, 'ALL', SE_UID); print_r($some); print_r($msgnos); print_r($uids); ?> The above example will output something similar to: Array ( [0] => 4 [1] => 6 [2] => 11 ) Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 ) Array ( [0] => 1 [1] => 4 [2] => 6 [3] => 8 [4] => 11 [5] => 12 ) SEE ALSO
imap_listscan(3). PHP Documentation Group IMAP_SEARCH(3)
All times are GMT -4. The time now is 10:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy