Sponsored Content
Top Forums Shell Programming and Scripting Split the file based on the content Post 302595143 by arukuku on Thursday 2nd of February 2012 08:12:09 AM
Old 02-02-2012
Franklin thanks for your reply. "Enterting in to the line" and "Finshing the sentence" are the two patterns. After extracting the code I have to check the words like ERROR or Warning or Error in the paragraphs and print only those paras or sentences.

please help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

split file depending on content

Hi, I have a file which contains records of data. I need to split the file into multiple files depending upon the value of last field. How do i read the last field of each record in the file??? Regards, Chaitrali (4 Replies)
Discussion started by: Chaitrali
4 Replies

2. Shell Programming and Scripting

Help with split the file content into multiple different file

Input file content: NA_10001 XA_10081 NG_10015 AC_1321.1 . . Desired output file: ls *.txt NA_10001.txt XA_10081.txt NG_10015.txt AC_1321.1.txt cat NA_10001.txt NA_10001 cat XA_10081.txt XA_10081 (1 Reply)
Discussion started by: perl_beginner
1 Replies

3. Shell Programming and Scripting

split file content

Hi All; I have input file like below name char(3) number number(3) inputfile namenumber xyz123abc509kai330 aca203 ald390afa000als303 I wanted to split like below:- output like this:- xyz123 abc509 kai330 aca203 ald390 (6 Replies)
Discussion started by: Jairaj
6 Replies

4. Shell Programming and Scripting

Help with split one file content into multiple different file

Input file: cat input_file.txt data_1 2342 data_3 242 data_1 3546 data_5 458 data_10 342 data_30 42 data_10 346 content_50 48 content_1 2343 Desired output: cat output_file1.txt data_1 2342 data_3 242 data_1 3546 data_5 458 (2 Replies)
Discussion started by: perl_beginner
2 Replies

5. Shell Programming and Scripting

split file content into specific folders

Hi I have a large text file and I want to split its content into multiple flies. this large file contains several blocks of codes separated by a comment line for each block. this comment line represents a directory path So, when separate these blocks each into a separate file, This output... (7 Replies)
Discussion started by: turki_00
7 Replies

6. Shell Programming and Scripting

Split a file in more files based on score content

Dear All, I have the following file tabulated: ID distanceTSS score 8434 571269 10 10122 393912 9 7652 6 10 4863 1451 9 8419 39 2 9363 564 21 9333 7714 22 9638 8334 9 1638 1231 11 10701 918 1000 6587 32056 111 What I would like to do is the following, create 100 new files based... (5 Replies)
Discussion started by: paolo.kunder
5 Replies

7. Shell Programming and Scripting

awk : split file and rename and save in path according to content

Hello, I'm using Windows 7 ; sed, awk and gnuwin32 are installed. I have a big text file I need to manipulate. In short, I will have to split it in thousands of short files, then rename and save in a folder which name is based upon filename. Here is a snippet of my big input.txt file (this... (4 Replies)
Discussion started by: sellig
4 Replies

8. Shell Programming and Scripting

Split a content in a file with specific interval base on the delimited values using UNIX command

Hi All, we have a requirement to split a content in a text file every 5 rows and write in a new file . conditions: if 5th line falls between center of the statement . it should look upto after ";" files are below format: 1 UPDATE TABLE TEST1 SET VALUE ='AFDASDFAS' 2 WHERE... (3 Replies)
Discussion started by: KK230689
3 Replies

9. Shell Programming and Scripting

Split content based on keywords

I need to split the file contents with multiple rows based on patterns Sample: Input: ABC101testXYZ102UKMNO1092testing ABC999testKMNValid Output: ABC101test XYZ102U KMN1092testing ABC999test KMNValid In this ABC , XYZ and KMN are patterns Continue here./mod] Please read forum... (1 Reply)
Discussion started by: Jairaj
1 Replies

10. UNIX for Beginners Questions & Answers

Split content based on keywords

I need to split the file contents with multiple rows based on patterns Sample: Input: ABC101testXYZ102UKMNO1092testing ABC999testKMNValid Output: ABC101test XYZ102U KMN1092testing ABC999test KMNValid In this ABC , XYZ and KMN are patterns (6 Replies)
Discussion started by: Jairaj
6 Replies
STYLE(1)                                                           User commands                                                          STYLE(1)

NAME
style - analyse surface characteristics of a document SYNOPSIS
style [-L language] [-l length] [-r ari] [file...] style [--language language] [--print-long length] [--print-ari ari] [file...] style -h|--help style --version DESCRIPTION
Style analyses the surface characteristics of the writing style of a document. It prints various readability grades, length of words, sen- tences and paragraphs. It can further locate sentences with certain characteristics. If no files are given, the document is read from standard input. Numbers are counted as words with one syllable. A sentence is a sequence of words, that starts with a capitalised word and ends with a full stop, double colon, question mark or exclamation mark. A single letter followed by a dot is considered an abbreviation, so it does not end a sentence. Various multi-letter abbreviations are recognized, they do not end a sentence as well. A paragraph consists of two or more new line characters. Readability grades Style understands cpp(1) #line lines for being able to give precise locations when printing sentences. Kincaid formula The Kincaid Formula was developed for U.S. Navy training manuals; it ranges in difficulty from 5.5 to 16.3. It is probably best applied to technical documents, because it is based on adult training manuals rather than school book text. Dialogs (often found in fictional texts) are usually a series of short sentences, which lowers the score. On the other hand, scientific texts with many long scientific terms are rated higher, although they are not necessarily harder to read for people who are familiar with those terms. Kincaid = 11.8*syllables/wds+0.39*wds/sentences-15.59 Automated Readability Index The Automated Readability Index is typically higher than Kincaid and Coleman-Liau, but lower than Flesch. ARI = 4.71*chars/wds+0.5*wds/sentences-21.43 Coleman-Liau Formula The Coleman-Liau Formula usually gives a lower grade than Kincaid, ARI and Flesch when applied to technical documents. Coleman-Liau = 5.89*chars/wds-0.3*sentences/(100*wds)-15.8 Flesch Reading Ease formula Developed by Rudolph Flesch in 1948, the Flesch Reading Ease formula is based on school texts covering grades 3 to 12. It is wide- spread, especially in the USA, because it is computed easily and produces good results. The index ranges from 0 (hard) to 100 (easy). Standard English documents average around 60 to 70. Applying it to German documents gives bad results because of the dif- ferent language structure. Flesch Index = 206.835-84.6*syll/wds-1.015*wds/sent Fog Index The Fog index was developed by Robert Gunning. Its value is a school grade. The "ideal" Fog Index level is 7 or 8. A level above 12 indicates the writing sample is too hard for most people to read. Texts less than 100 words will not produce meaningful results. Note that a correct implementation would not count words of three or more syllables that are proper names, combinations of easy words, or made three syllables by suffixes such as -ed, -es, or -ing. Fog Index = 0.4*(wds/sent+100*((wds >= 3 syll)/wds)) Lix formula The Lix formula developed by Bjornsson from Sweden is very simple and employs a mapping table as well: Lix = wds/sent+100*(wds >= 6 char)/wds Index 34 38 41 44 48 51 54 57 School year 5 6 7 8 9 10 11 SMOG Grading The SMOG Grading for English texts was developed by McLaughlin in 1969. Its result is a school grade. SMOG Grading = square root of (((wds >= 3 syll)/sent)*30) + 3 It was adapted to German by Bamberger and Vanecek in 1984, who changed the constant +3 to -2. Word usage The word usage counts are intended to help identify excessive use of particular parts of speech. Verb Phrases The category of verbs labeled "to be" identifies phrases using the passive voice. Use the passive voice sparingly, in favor of more direct verb forms. The flag -p causes style to list all occurrences of the passive voice. The verb category "aux" measures the use of modal auxiliary verbs, such as "can", "could", and "should". Modal auxiliary verbs modify the mood of a verb. Conjunctions The conjunctions counted by style are coordinating and subordinating. Coordinating conjunctions join grammatically equal sentence fragments, such as a noun with a noun, a phrase with a phrase, or a clause to a clause. Coordinating conjunctions are "and," "but," "or," "yet," and "nor." Subordinating conjunctions connect clauses of unequal status. A subordinating conjunction links a subordinate clause, which is unable to stand alone, to an independent clause. Examples of subordinating conjunctions are "because," "although," and "even if." Pronouns Pronouns are contextual references to nouns and noun phrases. Documents with few pronouns generally lack cohesiveness and fluidity. Too many pronouns may indicate ambiguity. Nominalizations Nominalizations are verbs that are changed to nouns. Style recognizes words that end in "ment," "ance," "ence," or "ion" as nomi- nalizations. Examples are "endowment," "admittance," and "nominalization." Too much nominalization in a document can sound abstract and be difficult to understand. The flag -N causes style to list all nominalizations. The flag -n prints all sentences with either the passive voice or a nominalization. OPTIONS
-L language, --language language set the document language. -l length, --print-long length print all sentences longer than length words. -r ari, --print-ari ari print all sentences whose readability index (ARI) is greater than ari. -p passive, --print-passive print all sentences phrased in the passive voice. -N nominalizations, --print-nom print all sentences containing nominalizations. -n nominalizations-passive, --print-nom-passive print all sentences phrased in the passive voice or containing nominalizations. -h, --help Print a short usage message. --version Print the version. ERRORS
On usage errors, 1 is returned. Termination caused by lack of memory is signalled by exit code 2. ENVIRONMENT
LC_MESSAGES=de|en specifies the document language. The default language is en. LC_CTYPE=iso-8859-1 specifies the document character set. The default character set is ASCII. AUTHOR
This program is GNU software, copyright 1997-2005 Michael Haardt <michael@moria.de>. It contains contributions by Jason Petrone <jpetrone@acm.org> and Uschi Stegemeier <uschi@morwain.de>. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HISTORY
There has been a style command on old UNIX systems, which is now part of the AT&T DWB package. The original version was bound to roff by enforcing a call to deroff. SEE ALSO
deroff(1), diction(1) Cherry, L.L.; Vesterman, W.: Writing Tools--The STYLE and DICTION programs, Computer Science Technical Report 91, Bell Laboratories, Murray Hill, N.J. (1981), republished as part of the 4.4BSD User's Supplementary Documents by O'Reilly. GNU June 09, 2006 STYLE(1)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy