Sponsored Content
Top Forums Shell Programming and Scripting Grep multiple lines from a file Post 302327991 by dwgi32 on Tuesday 23rd of June 2009 06:25:06 AM
Old 06-23-2009
Grep multiple lines from a file

Hi,

I would like to ask if there is any method to grep a chuck of lines based on the latest file in a directory.

E.g

Latest file in the directory:
Line 1: 532243
Line 2: 123456
Line 3: 334566
Line 4: 44567545

I wanted to grep all the line after line 2 i.e. Line 3 and line 4 and then writing them in a file.

Cheers
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep on multiple lines

I 'm trying to grep 2 fieldds on 2 differnt lines. Like this: psit > file egrep -e '(NS|ES)' $file. Not working. If this succeeds then run next cmd else exit. Pls Help Gundu (13 Replies)
Discussion started by: gundu
13 Replies

2. Shell Programming and Scripting

grep multiple lines

Hi. I have this format on a textfile: VG Name /dev/vg00 PV Name /dev/dsk/c16t0d0 PV Name /dev/dsk/c18t0d0 PV Name /dev/dsk/c16t4d0 VG Name /dev/vg01 PV Name ... (6 Replies)
Discussion started by: jOOc
6 Replies

3. AIX

Grep multiple lines and redirect to file

I have setof files with data and with same fields multiple times in each of the files. for example: file 1 name = mary kate last name = kate address = 123 street = abc name = mary mark last name = mark address = 456 street = bcd file 2 name = mary kate last name = kate... (2 Replies)
Discussion started by: relearner
2 Replies

4. Shell Programming and Scripting

Grep multiple lines and save to a file

Sir I have a data file e.g. DATA31082009. This file consists of several data files appended to that file. The size of each data file is different. The first line of each file starts with "44". I want to grep data from "44" to the preceding line of next "44" and save it as a individual file.... (10 Replies)
Discussion started by: chssastry
10 Replies

5. UNIX for Dummies Questions & Answers

grep command to find multiple strings in multiple lines in a file.

I want to search files (basically .cc files) in /xx folder and subfolders. Those files (*.cc files) must contain #include "header.h" AND x() function. I am writing it another way to make it clear, I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies

6. UNIX for Dummies Questions & Answers

grep in multiple lines

hi i have kind of below text in a file. I want to get a complete paragraph starting with START and ending with before another START) which has a particular string say XYZ or ABC START XYZ hshjghkjh 45 ljkfd fldjlj d jldf START 3493u ABC 454 4545454 4545454 45454 4545454 START ...... (3 Replies)
Discussion started by: reldb
3 Replies

7. UNIX for Advanced & Expert Users

grep across multiple lines

How do you grep 'select * from table_name' string from a script if the select * and from table_name are on 2 different lines ? like select * from table_name Any help would be greatly appreciated !!! Thanks RDR (4 Replies)
Discussion started by: RDR
4 Replies

8. UNIX for Dummies Questions & Answers

Grep multiple lines

I want to grep multiple lines from a text file. I want to grep all lines containing X,Y and NA in a single command. How do I go about doing that? This is what my text files look like: rs1983866 0.0983 10 100016313 rs1983865 0.5994 X 100016339 rs1983864 0.3272 11 100017453 rs7077266... (2 Replies)
Discussion started by: evelibertine
2 Replies

9. UNIX for Dummies Questions & Answers

How to grep multiple lines from a text file using another text file?

I would like to use grep to select multiple lines from a text file using a single-column text file. Basically I want to only select lines from the first text file where the second column of the first text file matches the second text file. How do I go about doing that? Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

10. Shell Programming and Scripting

Removing multiple lines from input file, if multiple lines match a pattern.

GM, I have an issue at work, which requires a simple solution. But, after multiple attempts, I have not been able to hit on the code needed. I am assuming that sed, awk or even perl could do what I need. I have an application that adds extra blank page feeds, for multiple reports, when... (7 Replies)
Discussion started by: jxfish2
7 Replies
ttk::labelframe(3tk)						 Tk Themed Widget					      ttk::labelframe(3tk)

__________________________________________________________________________________________________________________________________________________

NAME
ttk::labelframe - Container widget with optional label SYNOPSIS
ttk::labelframe pathName ?options? _________________________________________________________________ DESCRIPTION
A ttk::labelframe widget is a container used to group other widgets together. It has an optional label, which may be a plain text string or another widget. STANDARD OPTIONS
-class -cursor -takefocus -style See the ttk_widget manual entry for details on the standard options. WIDGET-SPECIFIC OPTIONS Command-Line Name:-labelanchor Database Name: labelAnchor Database Class: LabelAnchor Specifies where to place the label. Allowed values are (clockwise from the top upper left corner): nw, n, ne, en, e, es, se, s,sw, ws, w and wn. The default value is theme-dependent. Command-Line Name:-text Database Name: text Database Class: Text Specifies the text of the label. Command-Line Name:-underline Database Name: underline Database Class: Underline If set, specifies the integer index (0-based) of a character to underline in the text string. The underlined character is used for mnemonic activation. Mnemonic activation for a ttk::labelframe sets the keyboard focus to the first child of the ttk::labelframe widget. Command-Line Name:-padding Database Name: padding Database Class: Padding Additional padding to include inside the border. Command-Line Name:-labelwidget Database Name: labelWidget Database Class: LabelWidget The name of a widget to use for the label. If set, overrides the -text option. The -labelwidget must be a child of the labelframe widget or one of the labelframe's ancestors, and must belong to the same top-level widget as the labelframe. Command-Line Name:-width Database Name: width Database Class: Width If specified, the widget's requested width in pixels. Command-Line Name:-height Database Name: height Database Class: Height If specified, the widget's requested height in pixels. (See ttk::frame(3tk) for further notes on -width and -height). WIDGET COMMAND
Supports the standard widget commands configure, cget, identify, instate, and state; see ttk::widget(3tk). SEE ALSO
ttk::widget(3tk), ttk::frame(3tk), labelframe(3tk) KEYWORDS
widget, frame, container, label, groupbox Tk 8.5 ttk::labelframe(3tk)
All times are GMT -4. The time now is 08:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy