Sponsored Content
Full Discussion: awk file split
Top Forums Shell Programming and Scripting awk file split Post 302885188 by f0usk4s on Friday 24th of January 2014 05:18:38 AM
Old 01-24-2014
Hello RavinderSingh13,

Thank you for your quick reply.
Unfortunately, this produces pretty much the same output with the code I posted earlier Smilie, n files where the file will have a counter in the filename as output.
However, I was trying to get the value of two tags in each filename Smilie

Thanks again
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Split file using awk

I am trying to read a file and split the file into multiple files. I need to create new files with different set of lines from the original file. ie, the first output file may contain 10 lines and the second 100 lines and so on. The criteria is to get the lines between two lines starting with some... (8 Replies)
Discussion started by: pvar
8 Replies

2. 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

3. Shell Programming and Scripting

split file with awk

I did a lot of search on this forum on spiting file; found a lot, but my requirement is a bit different, please guide. Master file: x:start:5 line1:23 line2:12 2:90 x:end:5 x:start:2 45:56 22:90 x:end:2 x:start:3 line1:23 line2:12 x:end:3 x:start:2 line5:23 (1 Reply)
Discussion started by: uwork72
1 Replies

4. Shell Programming and Scripting

awk - split file

How can I split a text file (in awk) in n others with number of record given in input? Thanks (6 Replies)
Discussion started by: pinguc
6 Replies

5. Shell Programming and Scripting

split a file using awk

Hi , I just need to split a file and outputfiles are redirected to gzip file need: Input file - A.gz content of A.gz is 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200112|sdfdf 100|sfdds|dffdds|200212|sdfdf 100|sfdds|dffdds|200212|sdfdf... (3 Replies)
Discussion started by: mohan_xunil
3 Replies

6. Shell Programming and Scripting

How to split a file using AWK?

Hello, I have a file like the following: david,a,b,c,20,r thomas,a,b,c,30,r willaiam,a,b,c,80,r barbara,a,b,c,100,r I would like to split the file into other files using a condition for the contents of column 5. The condition should be a if the contents of column 5 is in a range... (4 Replies)
Discussion started by: keenboy100
4 Replies

7. Shell Programming and Scripting

AWK File Split

Hi All, Input.txt XYZONEABC                  CZXTWOJJJ KKKSIXOOO asdfhajlsdhfajs asdfasfasdf Output Files: ONE.txt XYZONEABC                 TWO.txt CZXTWOJJJ SIX.txt KKKSIXOOO I had a script (2 Replies)
Discussion started by: kmsekhar
2 Replies

8. Shell Programming and Scripting

Split a file with awk

Hi! I have a file like this: a,b,c,12,d,e a,b,c,13,d,e a,b,c,14,d,e a,b,c,15,d,e a,b,c,16,d,e a,b,c,17,d,e I need to split that file in two: If field 4 is equal or higher than 14 that row goes to one file and if it is equal or higher than 15 to another. Can anyone point me in the... (2 Replies)
Discussion started by: Tr0cken
2 Replies

9. Shell Programming and Scripting

Split File by Pattern with File Names in Source File... Awk?

Hi all, I'm pretty new to Shell scripting and I need some help to split a source text file into multiple files. The source has a row with pattern where the file needs to be split, and the pattern row also contains the file name of the destination for that specific piece. Here is an example: ... (2 Replies)
Discussion started by: cul8er
2 Replies

10. UNIX for Beginners Questions & Answers

Split file using awk

I need to split the incoming source file in to multiple files using awk. Split position is (6,13) : 8 positions All the records that are greater than 20170101 and less than or equal to 20181231 should go in a split file with file name as source... (11 Replies)
Discussion started by: rosebud123
11 Replies
mailp(1)							   User Commands							  mailp(1)

NAME
mailp, digestp, filep, newsp, filofaxp, franklinp, timemanp, timesysp - frontends to the mp Text to PDL (Printer Description Language) pretty print filter SYNOPSIS
mailp [options] filename... newsp [options] filename... digestp [options] filename... filep [options] filename... filofaxp [options] filename... franklinp [options] filename... timemanp [options] filename... timesysp [options] filename... DESCRIPTION
The mailp utility is a frontend to the mp(1) program. It uses different names to provide various mp options: mailp Prints out mail messages. newsp Prints out USENET news articles. digestp Prints out USENET digest files. filep Prints out ordinary ASCII files. filofaxp Prints out in Filofax personal organiser format. franklinp Prints out in Franklin Planner personal organiser format. timemanp Prints out in Time Manager personal organiser format. timesysp Prints out in Time/System International personal organiser format. mailp and the associated programs read each filename in sequence and generate a prettified version of the contents. If no filename argu- ments are provided, mailp reads the standard input. mailp works in two ways. With the -D option, it will work as an X print server client to produce the PDL of the target printer and spool it. With the -d or -P option, it will generate and spool PostScripttm output. OPTIONS
The following options are supported: -d printer Sends output to the named printer. Otherwise, sends output to the printer named in the PRINTER environment variable. -D Generates the PDL for the target printer and spools it to the printer. -F Instead of printing who the mail article is for, the top header will contain who the mail article is from. This is a useful option for people with their own personal printer. -h Banner printing is disabled. Most of the information that typically appears on the banner sheet is output in the mp ban- ners. -l Formats output in landscape mode. Two pages of text will be printed per sheet of paper. -P printer Same as -d option. -s subject Uses subject as the new subject for the printout. If you are printing ordinary ASCII files which have been specified on the command line, the subject will default to the name of each of these files. OPERANDS
The following operand is supported: filename The name of the file to be read. ENVIRONMENT VARIABLES
If none of the -d, -D, or -P options is used, mailp uses the PRINTER environment variable to determine the printer to which the output from the mp(1)program is sent. If the PRINTER variable is not found, the default destination is the PostScripttm printer. EXIT STATUS
The following exit values are returned: 0 Successful completion. 1 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmp | +-----------------------------+-----------------------------+ SEE ALSO
mp(1), attributes(5) NOTES
The -P option, which spools the PDL directly to the target printer in mp(1), produces PostScripttm when used in mailp so as to be backward compatible. SunOS 5.10 30 Oct 2000 mailp(1)
All times are GMT -4. The time now is 03:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy