Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Split file based on number of blank lines Post 302895573 by vbe on Tuesday 1st of April 2014 10:44:47 AM
Old 04-01-2014
Into 2 files, but what is supposed to be in each?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can I get an if statement to execute based on number of lines in a file?

I need to have an if statement in a script to run if there are certain processes running. Easiest way I can see to do this is to run a ps and grep the results based on what I am looking for: $ ps -ef | grep wtrs --- webtrend 5046 1 0 May 12 ? 0:28 /webtrends/versions/6.1/wtrs_ui... (6 Replies)
Discussion started by: LordJezo
6 Replies

2. Shell Programming and Scripting

Split File Based on Line Number Pattern

Hello all. Sorry, I know this question is similar to many others, but I just can seem to put together exactly what I need. My file is tab delimitted and contains approximately 1 million rows. I would like to send lines 1,4,& 7 to a file. Lines 2, 5, & 8 to a second file. Lines 3, 6, & 9 to... (11 Replies)
Discussion started by: shankster
11 Replies

3. Shell Programming and Scripting

Scripting help: Split a file into equal number of lines.

Experts, I have a file datafile.txt that consists of 1732 Line, I want to split the file into equal number of lines with 10 file. (The last file can have 2 line extra to match 1732) Please advise how to do that, Thanks in advance.. (2 Replies)
Discussion started by: rveri
2 Replies

4. Shell Programming and Scripting

Split single file into multiple files based on the number in the column

Dear All, I would like to split a file of the following format into multiple files based on the number in the 6th column (numbers 1, 2, 3...): ATOM 1 N GLY A 1 -3.198 27.537 -5.958 1.00 0.00 N ATOM 2 CA GLY A 1 -2.199 28.399 -6.617 1.00 0.00 ... (3 Replies)
Discussion started by: tomasl
3 Replies

5. Shell Programming and Scripting

Script to split files based on number of lines

I am getting a few gzip files into a folder by doing ftp to another server. Once I get them I move them to another location .But before that I need to make sure each gzip is not more than 5000 lines and split it up . The files I get are anywhere from 500 lines to 10000 lines in them and is in gzip... (4 Replies)
Discussion started by: gubbu
4 Replies

6. Shell Programming and Scripting

split a csv file into specified number of files (not lines)

hi, i really need it ...it's not simple to explain but as it's part of a crontab i can't split the file manually...and the file can change every day so the lines are not a good base. example: how to split 1 csv file in 15 files? thank you very much regards :b: (4 Replies)
Discussion started by: 7stars
4 Replies

7. UNIX for Dummies Questions & Answers

Command to split the files based on the number of lines in it

Hello Friends, Can anyone help me for the below requirement. I am having a file called Input.txt. My requirement is first check the count that is wc -l input.txt If the result of the wc -l Input.txt is less than 10 then don't split the Input.txt file. Where as if Input.txt >= 10 the split... (12 Replies)
Discussion started by: malaya kumar
12 Replies

8. Shell Programming and Scripting

How to split a file based on pattern line number?

Hi i have requirement like below M <form_name> sdasadasdMklkM D ...... D ..... M form_name> sdasadasdMklkM D ...... D ..... D ...... D ..... M form_name> sdasadasdMklkM D ...... M form_name> sdasadasdMklkM i want split file based on line number by finding... (10 Replies)
Discussion started by: bhaskar v
10 Replies

9. Shell Programming and Scripting

Split File based on number of rows

Hi I have a requirement, where i will receive multiple files in a folder (say: /fol1/fol2/). There will be at least 14 to 16 files. The size of the files will different, some may be 80GB or 90GB, some may be less than 5 GB (and the size of the files are very unpredictable). But the names of the... (10 Replies)
Discussion started by: kpk_ds
10 Replies

10. UNIX for Beginners Questions & Answers

Split file into multiple files based on empty lines

I am using below code to split files based on blank lines but it does not work. awk 'BEGIN{i=0}{RS="";}{x="F"++i;}{print > x;}' Your help would be highly appreciated find attachment of sample.txt file (2 Replies)
Discussion started by: imranrasheedamu
2 Replies
POSTSUPER(1)						      General Commands Manual						      POSTSUPER(1)

NAME
postsuper - Postfix superintendent SYNOPSIS
postsuper [-psv] [-d queue_id] [-r queue_id] [directory ...] DESCRIPTION
The postsuper command does maintenance jobs on the Postfix queue. Use of the command is restricted to the super-user. By default, postsuper performs the operations requested with the -s and -p command-line options on all Postfix queue directories - this includes the incoming, active and deferred directories with mail files and the bounce, defer and flush directories with log files. Options: -d queue_id Delete one message with the named queue ID from the named mail queue(s) (default: incoming, active and deferred). If a queue_id of - is specified, the program reads queue IDs from standard input. Specify -d ALL to remove all messages; for example, specify -d ALL deferred to delete mail in the deferred queue. As a safety mea- sure, the word ALL must be specified in upper case. Postfix queue IDs are reused. There is a very small possibility that postsuper deletes the wrong message file when it is executed while the Postfix mail system is running. The scenario is as follows: 1) The Postfix queue manager deletes the message that postsuper is supposed to delete, because Postfix is finished with the mes- sage. 2) New mail arrives, and the new message is given the same queue ID as the message that postsuper is supposed to delete. The probability for reusing a deleted queue ID is about 1 in 2**15 (the number of different microsecond values that the system clock can distinguish within a second). 3) postsuper deletes the new message, instead of the old message that it should have deleted. -p Purge old temporary files that are left over after system or software crashes. -r queue_id Requeue the message with the named queue ID from the named mail queue(s) (default: incoming, active and deferred). To requeue mul- tiple messages, specify multiple -r command-line options. Alternatively, if a queue_id of - is specified, the program reads queue IDs from standard input. Specify -r ALL to requeue all messages. As a safety measure, the word ALL must be specified in upper case. A requeued message is moved to the maildrop queue, from where it is copied by the pickup daemon to a new file whose name is guaran- teed to match the new queue file inode number. The new queue file is subjected again to mail address rewriting and substitution. This is useful when rewriting rules or virtual mappings have changed. Postfix queue IDs are reused. There is a very small possibility that postsuper requeues the wrong message file when it is executed while the Postfix mail system is running, but no harm should be done. -s Structure check and structure repair. It is highly recommended to perform this operation once before Postfix startup. o Rename files whose name does not match the message file inode number. This operation is necessary after restoring a mail queue from a different machine, or from backup media. o Move queue files that are in the wrong place in the file system hierarchy and remove subdirectories that are no longer needed. File position rearrangements are necessary after a change in the hash_queue_names and/or hash_queue_depth configura- tion parameters. -v Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose. DIAGNOSTICS
Problems are reported to the standard error stream and to syslogd. postsuper reports the number of messages deleted with -d, the number of messages requeued with -r, and the number of messages whose queue file name was fixed with -s. The report is written to the standard error stream and to syslogd. CONFIGURATION PARAMETERS
See the Postfix main.cf file for syntax details and for default values. hash_queue_depth Number of subdirectory levels for hashed queues. hash_queue_names The names of queues that are organized into multiple levels of subdirectories. LICENSE
The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA POSTSUPER(1)
All times are GMT -4. The time now is 06:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy