Sponsored Content
Top Forums Shell Programming and Scripting awk - split data based on the count Post 302977445 by chill3chee on Monday 18th of July 2016 10:27:51 AM
Old 07-18-2016
solved

That was absolutely brilliant. Thank you RudiC Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk script to split a file based on the condition

I have the file with the records like 4234234 US phone 3244234 US cup 2342342 CA phone 8947234 US phone 2389472 CA cup 2348972 US maps 3894234 CA phone I want the records with (US,phone) as record to be in one file, (Us, cup) in another file and (CA,cup) to be in another I mean all... (12 Replies)
Discussion started by: superprogrammer
12 Replies

2. Shell Programming and Scripting

Split a file based on pattern in awk, grep, sed or perl

Hi All, Can someone please help me write a script for the following requirement in awk, grep, sed or perl. Buuuu xxx bbb Kmmmm rrr ssss uuuu Kwwww zzzz ccc Roooowwww eeee Bxxxx jjjj dddd Kuuuu eeeee nnnn Rpppp cccc vvvv cccc Rhhhhhhyyyy tttt Lhhhh rrrrrssssss Bffff mmmm iiiii Ktttt... (5 Replies)
Discussion started by: kumarn
5 Replies

3. Shell Programming and Scripting

using awk to count no of records based on conditions

Hi I am having files with date and time stamp as the folder names like 200906051400,200906051500,200906051600 .....hence everyday 24 files will be generated i need to do certain things on this 24 files daily file contains the data like 200906050016370 0 1244141195225298lessrv3 ... (13 Replies)
Discussion started by: aemunathan
13 Replies

4. Shell Programming and Scripting

split file based on group count

Hi, can some one please help me to split the file based on groups. like in the below scenario x indicates the begining of the group and the file should be split each with 2 groups below there are 10 groups it should create 5 files. could you please help? (4 Replies)
Discussion started by: hitmansilentass
4 Replies

5. Shell Programming and Scripting

Split File data using awk

HI Guys, I need to split the file in to number of files . file contains FILEHEADER and EOF . I have to split n number of times . I have to form the file with each splitted message between FILEHEADER and EOF using awk beign and end . how to implement please suggest. (2 Replies)
Discussion started by: manish8484
2 Replies

6. Shell Programming and Scripting

KSH: Split String into smaller substrings based on count

KSH HP-SOL-Lin Cannot use xAWK I have several strings that are quite long and i want to break them down into smaller substrings. What I have String = "word1 word2 word3 word4 .....wordx" What I want String1="word1 word2" String2="word 3 word4" String3="word4 word5" Stringx="wordx... (5 Replies)
Discussion started by: nitrobass24
5 Replies

7. Shell Programming and Scripting

awk script to split file into multiple files based on many columns

So I have a space delimited file that I'd like to split into multiple files based on multiple column values. This is what my data looks like 1bc9A02 1 10 1000 FTDLNLVQALRQFLWSFRLPGEAQKIDRMMEAFAQRYCQCNNGVFQSTDTCYVLSFAIIMLNTSLHNPNVKDKPTVERFIAMNRGINDGGDLPEELLRNLYESIKNEPFKIPELEHHHHHH 1ku1A02 1 10... (9 Replies)
Discussion started by: viored
9 Replies

8. Shell Programming and Scripting

awk to split and parse unpredictable data

data.txt: CRITICAL: iLash: 97.00%, SqlPlus: 99.00%. Warning/critical thresholds: 95/98% I need to pull only the disknames: iLash and SqlPlus The following command will only pull iLash: echo "CRITICAL: iLash: 97.00%, SqlPlus: 99.00%. Warning/critical thresholds: 95/98%" | awk -F":"... (7 Replies)
Discussion started by: SkySmart
7 Replies

9. Shell Programming and Scripting

awk to count and rename based on fields

In the below awk using the tab-delimited input, I am trying count the - symbol in $5 and output the count as well as the renamed condition ins. I am also count the - symbol in $6 and output the count as well as the renamed condition del. I am also count the tomes that in $5 and $6 there are... (6 Replies)
Discussion started by: cmccabe
6 Replies

10. Shell Programming and Scripting

Split files based on row delimiter count

I have a huge file (around 4-5 GB containing 20 million rows) which has text like: <EOFD>11<EOFD>22<EORD>2<EOFD>2222<EOFD>3333<EORD>3<EOFD>44<EOFD>55<EORD>66<EOFD>888<EOFD>9999<EORD> Actually above is an extracted file from a Sql Server with each field delimited by <EOFD> and each row ends... (8 Replies)
Discussion started by: amvip
8 Replies
Mojolicious::Guides::CodingGuidelines(3pm)		User Contributed Perl Documentation		Mojolicious::Guides::CodingGuidelines(3pm)

NAME
Mojolicious::Guides::CodingGuidelines - Coding guidelines OVERVIEW
This document describes the coding guidelines that are the foundations of Mojo and Mojolicious development. Please do not send patches unless you agree with them. MISSION STATEMENT
Mojo is a runtime environment for Perl real-time web frameworks. It provides all the basic tools and helpers needed to write simple web applications and higher level web frameworks such as Mojolicious. All components should be reusable in other projects and in a UNIXish way only loosely coupled. Especially for people new to Perl it should be as easy as possible to install Mojolicious and get started. Writing web applications can be one of the most fun ways to learn a language! For developers of other web frameworks it should be possible to reuse all the infrastructure and just consider the higher levels of the Mojolicious distribution an example application. RULES
Web development should be easy and fun, this is what we optimize for. The web is a moving target, to stay relevant we have to stay in motion too. Keep it simple, no magic unless absolutely necessary. The installation process should be as fast and painless as possible. (Less than a minute on most common hardware is a good rule of thumb) The addition and modification of features is decided by majority vote or the pumpking. Any core developer may nominate a new one, who must then be accepted by a 2/3 majority vote. The pumpking has veto rights and may select his successor. It's not a feature without a test and documentation. A feature is only needed when the majority of the userbase benefits from it. Features may only be changed in a major release or after being deprecated for at least 3 months. Refactoring and deprecations should be avoided if no important feature depends on it. New features can be marked as experimental to be excluded from deprecation policies. A major release is signaled by a new major version number and a unique code name based on a unicode character. Only add dependencies if absolutely necessary and make them optional if possible. Domain specific languages should be avoided in favor of Perl-ish solutions. No inline POD. Documentation belongs to the guides, module POD is just an API reference. The main focus of the included documentation should be on examples, no walls of text. (An example for every one or two sentences is a good rule of thumb) Everything should be ordered alphabetically if possible. The master source code repository should always be kept in a stable state, use feature branches for actual development. Code has to be run through Perl::Tidy with the included ".perltidyrc", and everything should look like it was written by a single person. Code should be organized in blocks and those blocks should be commented. No spaghetti code. Comments should be correctly capitalized, and funny if possible, punctuation is optional if it doesn't increase readability. Every file should contain at least one quote from "The Simpsons" or "Futurama". No names outside of "Mojolicious.pm". No Elitism. Peace! MORE
You can continue with Mojolicious::Guides now or take a look at the Mojolicious wiki <http://github.com/kraih/mojo/wiki>, which contains a lot more documentation and examples by many different authors. perl v5.14.2 2012-09-05 Mojolicious::Guides::CodingGuidelines(3pm)
All times are GMT -4. The time now is 02:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy