Sponsored Content
Top Forums Shell Programming and Scripting output words between sentences SED Post 302268967 by vgersh99 on Tuesday 16th of December 2008 03:35:54 PM
Old 12-16-2008
Code:
echo 'Thu Dec  4 08:28:57 2008 : Auth: Login OK: [vyce6220] (from client LINKSYS3 port 12 cli 001644fc4838' | nawk -F'([]])|([[])|([() ])' '{ print $12, $17, $NF}'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed [delete everything between two words]

Hi, I have the following codes below that aims to delete every words between two pattern word. Say I have the files To delete every word between WISH_LIST=" and " I used the below codes (but its not working): #!/bin/sh sed ' /WISH_LIST=\"/ { N /\n.*\"/ {... (3 Replies)
Discussion started by: Orbix
3 Replies

2. Shell Programming and Scripting

search two words in sed

I've following sed command working fine - sed '/search_pattern1/ !s/pattern1/pattern2/" file Now, I want to search two patterns - search_pattern1 and search_pattern2 . How can put these into above sed statement ? Thanks in advance. (12 Replies)
Discussion started by: ajitkumar2
12 Replies

3. Shell Programming and Scripting

sed append words

Hi all, I have a file like one two three for five six seven eight ..... Actually i need to append a label to the words that belong to the 2 column and get: one two_label three for five six_label seven eight .... I was trying with sed inside vim but I can't figure out... (9 Replies)
Discussion started by: Dedalus
9 Replies

4. UNIX for Dummies Questions & Answers

How do I color some words in output?

OK, let's say if we want to filter lines in man and get a different color for the word we are searching we write man find | grep print It will mark all the words containing print red and output only those lines containing it, let's say I want to see the complete manual, but with marked words... (1 Reply)
Discussion started by: arcelivez
1 Replies

5. Shell Programming and Scripting

SED - delete words between two possible words

Hi all, I want to make an script using sed that removes everything between 'begin' (including the line that has it) and 'end1' or 'end2', not removing this line. Let me paste an 2 examples: anything before any string begin few lines of content end1 anything after anything before any... (4 Replies)
Discussion started by: meuser
4 Replies

6. Shell Programming and Scripting

grep words from output file

Hi, By using shell scripit i have save output in one file. I want to grep two words named CLUSTER and CLUSQMGR from that output file. How to grep that. output file would be having below words TYPE(QCLUSTER) ALTDATE(2010-05-17) CLUSTER(QS.CL.MFT1) ... (5 Replies)
Discussion started by: darling
5 Replies

7. Shell Programming and Scripting

Grep words with spaces and save the output

I have a file that contains the schedule for a tournament with 41 teams. The team names have spaces in them. I would like to search for each teams schedule and then save that to that teams file For example Team name: "Team Two" I would like to search for all the games for "Team Two" and... (8 Replies)
Discussion started by: knijjar
8 Replies

8. Shell Programming and Scripting

Swap words using sed

Hi. I have to swap the first and the third word in all lines of a txt file using sed. Separators between words are: any charachter, except intervall. I hope, you'll understand what I want to do. my english is not so good, sorry for that:) (10 Replies)
Discussion started by: T720
10 Replies

9. Shell Programming and Scripting

Count lines and words of a stream output with tail

Hello, I need to tail -f a file output stream and I need to get only lines that contains "get" and "point" in the same line. It doesn't matter the order. Then I need only the text BEFORE "point". I have to count each line and perform other serveral actions after this has performed 3 times.... (9 Replies)
Discussion started by: Kibou
9 Replies

10. Shell Programming and Scripting

Reverse words with sed

Hi guys, I'm wondering what the best way would be to reverse words in a string based on certain characters. For example: echo Word1Word2Word3Word4 | sed ' /\n/ !G s/\(Word.\)\(.*\n\)/&\2\1/ //D ' This returns: Word4Word3Word2Word1 I'm no sed expert but... (2 Replies)
Discussion started by: Subbeh
2 Replies
style(1)						      General Commands Manual							  style(1)

Name
       style - analyze surface characteristics of a document

Syntax
       style [-ml] [-mm] [-a] [-e] [-l num] [-r num] [-p] [-P] file...

Description
       The command analyzes the surface characteristics of the writing style of a document.  It reports on readability, sentence length and struc-
       ture, word length and usage, verb type, and sentence openers.  Because runs before looking at the text, formatting header files	should	be
       included  as  part  of  the  input.  The default macro package -ms may be overridden with the flag -mm.	The flag -ml, which causes to skip
       lists, should be used if the document contains many lists of non-sentences.  The other options are used to locate  sentences  with  certain
       characteristics.

Options
       -a Displays all sentences with their length and readability index.

       -e Displays all sentences that begin with an expletive.

       -l num
	  Displays all sentences longer than num.

       -ml
	  Skips lists in document.

       -mm
	  Overrides the default macro package -ms.

       -P Displays parts of speech of the words in the document.

       -p Displays all sentences that contain a passive verb.

       -r num
	  Displays all sentences whose readability index is greater than num.

Restrictions
       Use of non-standard formatting macros may cause incorrect sentence breaks.

See Also
       deroff(1), diction(1)

																	  style(1)
All times are GMT -4. The time now is 04:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy