Sponsored Content
Top Forums Shell Programming and Scripting split file by delimiter with csplit Post 302679753 by yifangt on Tuesday 31st of July 2012 03:19:29 PM
Old 07-31-2012
Thanks Chirel!
I did not mean to create one sequence a file, but every 500 (for example) sequences a file. What is the ARG for that?

Last edited by yifangt; 07-31-2012 at 04:46 PM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

split string with multibyte delimiter

Hi, I need to split a string, either using awk or cut or basic unix commands (no programming) , with a multibyte charectar as a delimeter. Ex: abcd-efgh-ijkl split by -efgh- to get two segments abcd & ijkl Is it possible? Thanks A.H.S (1 Reply)
Discussion started by: azmathshaikh
1 Replies

2. UNIX for Dummies Questions & Answers

Split files using Csplit

I have an excel file with more than 65K records... Since excel does not take more than 65K records i wan to split the file and send it as two excel files... Could some help me how to use the csplit by specifiying the no of records (7 Replies)
Discussion started by: savitha
7 Replies

3. UNIX for Dummies Questions & Answers

Split a file with no pattern -- Split, Csplit, Awk

I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this. For example: split -l 3000000 filename.txt This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies

4. Shell Programming and Scripting

How to split a string with no delimiter

Hi; I want to write a shell script that will split a string with no delimiter. Basically the script will read a line from a file. For example the line it read from the file contains: 99234523 These values are never the same but the length will always be 8. How do i split this... (8 Replies)
Discussion started by: saint34
8 Replies

5. Shell Programming and Scripting

Help- counting delimiter in a huge file and split data into 2 files

I’m new to Linux script and not sure how to filter out bad records from huge flat files (over 1.3GB each). The delimiter is a semi colon “;” Here is the sample of 5 lines in the file: Name1;phone1;address1;city1;state1;zipcode1 Name2;phone2;address2;city2;state2;zipcode2;comment... (7 Replies)
Discussion started by: lv99
7 Replies

6. Shell Programming and Scripting

Split file into multiple files using delimiter

Hi, I have a file which has many URLs delimited by space. Now i want them to move to separate files each one holding 10 URLs per file. http://3276.e-printphoto.co.uk/guardian http://abdera.apache.org/ http://abdera.apache.org/docs/api/index.html I have used the below code to arrange... (6 Replies)
Discussion started by: vel4ever
6 Replies

7. Shell Programming and Scripting

How to target certain delimiter to split text file?

Hi, all. I have an input file. I would like to generate 3 types of output files. Input: LG10_PM_map_19_LEnd_1000560 LG10_PM_map_6-1_27101856 LG10_PM_map_71_REnd_20597718 LG12_PM_map_5_chr_118419232 LG13_PM_map_121_24341052 LG14_PM_1a_456799 LG1_MM_scf_5a_opt_abc_9029993 ... (5 Replies)
Discussion started by: huiyee1
5 Replies

8. UNIX for Advanced & Expert Users

How to split large file with different record delimiter?

Hi, I have received a file which is 20 GB. We would like to split the file into 4 equal parts and process it to avoid memory issues. If the record delimiter is unix new line, I could use split command either with option l or b. The problem is that the line terminator is |##| How to use... (5 Replies)
Discussion started by: Ravi.K
5 Replies

9. UNIX for Beginners Questions & Answers

Shell script to Split matrix file with delimiter into multiple files

I have a large semicolon delimited file with thousands of columns and many thousands of line. It looks like: ID1;ID2;ID3;ID4;A_1;B_1;C_1;A_2;B_2;C_2;A_3;B_3;C_3 AA;ax;ay;az;01;02;03;04;05;06;07;08;09 BB;bx;by;bz;03;05;33;44;15;26;27;08;09 I want to split this table in to multiple files: ... (1 Reply)
Discussion started by: trymega
1 Replies
MARK(1) 							     [nmh-1.5]								   MARK(1)

NAME
mark - manipulate message sequences SYNOPSIS
mark [+folder] [msgs] [-sequence name ...] [-add | -delete] [-list] [-public | -nopublic] [-zero | -nozero] [-version] [-help] DESCRIPTION
The mark command manipulates message sequences by adding or deleting message numbers from folder-specific message sequences, or by listing those sequences and messages. A message sequence is a keyword, just like one of the "reserved" message names, such as "first" or "next". Unlike the "reserved" message names, which have a fixed semantics on a per-folder basis, the semantics of a message sequence may be defined, modified, and removed by the user. Message sequences are folder-specific, e.g., the sequence name "seen" in the context of folder "+inbox" need not have any relation whatsoever to the sequence of the same name in a folder of a different name. Three action switches direct the operation of mark. These switches are mutually exclusive: the last occurrence of any of them overrides any previous occurrence of the other two. The -add switch tells mark to add messages to sequences or to create a new sequence. For each sequence named via the -sequence name argu- ment (which must occur at least once) the messages named via msgs (which defaults to "cur" if no msgs are given), are added to the sequence. The messages to be added need not be absent from the sequence. If the -zero switch is specified, the sequence will be emptied prior to adding the messages. Hence, -add -zero means that each sequence should be initialized to the indicated messages, while -add -nozero means that each sequence should be appended to by the indicated messages. The -delete switch tells mark to delete messages from sequences, and is the dual of -add. For each of the named sequences, the named mes- sages are removed from the sequence. These messages need not be already present in the sequence. If the -zero switch is specified, then all messages in the folder are added to the sequence (first creating the sequence, if necessary) before removing the messages. Hence, -delete -zero means that each sequence should contain all messages except those indicated, while -delete -nozero means that only the indi- cated messages should be removed from each sequence. As expected, the command "mark -sequence foo -delete all" deletes the sequence "foo" from the current folder. When creating or modifying sequences, you can specify the switches -public or -nopublic to force the new or modified sequences to be "pub- lic" or "private". The switch -public indicates that the sequences should be made "public". These sequences will then be readable by all nmh users with permission to read the relevant folders. In contrast, the -nopublic switch indicates that the sequences should be made "private", and will only be accessible by you. If neither of these switches is specified, then existing sequences will maintain their cur- rent status, and new sequences will default to "public" if you have write permission for the relevant folder. Check the mh-sequence(5) man page for more details about the difference between "public" and "private" sequences. The -list switch tells mark to list both the sequences defined for the folder and the messages associated with those sequences. Mark will list the name of each sequence given by -sequence name and the messages associated with that sequence. If the sequence is private, this will also be indicated. If no sequence is specified by the -sequence switch, then all sequences for this folder will be listed. The -zero switch does not affect the operation of -list. The current restrictions on sequences are: o The name used to denote a message sequence must consist of an alphabetic character followed by zero or more alphanumeric characters, and cannot be one of the (reserved) message names "new", "first", "last", "all", "next", or "prev". o Only a certain number of sequences may be defined for a given folder. This number is usually limited to 27 (11 on small systems). (The internal implementation relies on bitmasks, with some bits set aside for internal use.) o Message ranges with user-defined sequence names are restricted to the form "name:n", "name:+n", or "name:-n", and refer to the first or last `n' messages of the sequence `name', respectively. Constructs of the form "name1-name2" are forbidden for user defined sequences. FILES
$HOME/.mh_profile The user profile PROFILE COMPONENTS
Path: To determine the user's nmh directory Current-Folder: To find the default current folder SEE ALSO
flist(1), pick(1), mh-sequence(5) DEFAULTS
`+folder' defaults to the current folder `-add' if -sequence is specified, -list otherwise `msgs' defaults to cur (or all if -list is specified) `-nozero' CONTEXT
If a folder is given, it will become the current folder. HELPFUL HINTS
Use flist to find folders with a given sequence, and "pick sequence -list" to enumerate those messages in the sequence (such as for use by a shell script). MH.6.8 11 June 2012 MARK(1)
All times are GMT -4. The time now is 12:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy