Sponsored Content
Top Forums Shell Programming and Scripting Extract Lines Containg a Keyword Post 302561042 by rangarasan on Monday 3rd of October 2011 02:29:19 AM
Old 10-03-2011
Pls post sample input and expected output.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cut lines before keyword

Hi, How to cut all lines in file before keyword? from 1 2333214 word ...... some text 2 234343 234234 word ...... some text 3 234324 324 3234 word ...... some text to 1 2333214 2 234343 234234 3 234324 324 3234 (4 Replies)
Discussion started by: Trump
4 Replies

2. Shell Programming and Scripting

Delete the lines after the last instance of the keyword

I have my input sometyhing like this aaa bbbbbb cccccc ddddd eeeee 1234 ravi kumar aaaaaa vvvvvvv 5678 ravi kumar rrrrrrr mmmmmmm I want the output as follows. aaa bbbbbb cccccc ddddd eeeee 1234 ravi kumar aaaaaa vvvvvvv 5678 ravi kumar (2 Replies)
Discussion started by: rdhanek
2 Replies

3. Shell Programming and Scripting

Delete the lines before the first instance of the keyword

I have my data something like this. I want to delete all the lines before the frist instance of the key word 'ravi kumar' aaa bbbbbb cccccc ddddd eeeee 1234 ravi kumar aaaaaa vvvvvvv 5678 ravi kumar rrrrrrr mmmmmmm I want the output as follows. 1234 ravi kumar aaaaaa... (8 Replies)
Discussion started by: rdhanek
8 Replies

4. Shell Programming and Scripting

Extract lines of text based on a specific keyword

I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility. I've been reading the forum & googling and can find... (4 Replies)
Discussion started by: DionDeVille
4 Replies

5. Shell Programming and Scripting

Merge file lines based off of keyword

Hello Everyone, I have two files I created in a format similar to the ones found below (character position is important): File 1: 21 Cat Y N S Y Y N N FOUR LEGS TAIL WHISKERS 30 Dog N N 1 Y Y N N FOUR LEGS TAIL 33 Fish Y N 1 Y Y N N FINS 43 CAR Y N S Y Y N N WHEELS DOORS... (7 Replies)
Discussion started by: jl487
7 Replies

6. Shell Programming and Scripting

Displaying all the lines starting with some keyword

consider the contents of a file has many stuff including few stuff that i need.. so i perfromed the below function cat filename | grep "ALTER TABLE" its output is as shown below . . . . . SET @sql:=CONCAT('ALTER TABLE RecordMixProfile AUTO_INCREMENT=', @maxId) ; SET... (14 Replies)
Discussion started by: vivek d r
14 Replies

7. Shell Programming and Scripting

extract lines from text after keyword

I have a text and I want to extract the 4 lines following a keyword! For example if I have this text and the keyword is AAA hello helloo AAA one two three four helloooo hellooo I want the output to be one two three four (7 Replies)
Discussion started by: stekanius
7 Replies

8. Shell Programming and Scripting

Need to extract the word after a particular keyword throughout the file..

Hi Everyone, Need help in extracting the hostname from the below output. Expected output: DS-TESTB-GDS-1.TEST.ABC.COM DS-TESTB-GDS-2.TEST.ABC.COM .... ... /tmp $ cat -n /tmp/patchreport 1 /usr/bin/perl /admin/bin/patch/applyPatches.pl --apply_patches... (4 Replies)
Discussion started by: thiyagoo
4 Replies

9. Shell Programming and Scripting

awk join lines based on keyword

Hello , I will need your help once again. I have the following file: cat file02.txt PATTERN XXX.YYY.ZZZ. 500 ROW01 aaa. 300 XS 14 ROW 45 29 AS XD.FD. PATTERN 500 ZZYN002 ROW gdf gsste ALT 267 fhhfe.ddgdg. PATTERN ERE.MAY. 280 PATTERRNTH 5000 rt.rt. ROW SO a 678 PATTERN... (2 Replies)
Discussion started by: alex2005
2 Replies

10. UNIX for Beginners Questions & Answers

awk to extract value after keyword in html

Using awk to extract value after a keyword in an html, and store in ts. The awk does execute but ts is empty. I use the tag as a delimiter and the keyword as a pattern, but there probably is a better way. Thank you :). file <html><head><title>xxxxxx xxxxx</title><style type="text/css"> ... (4 Replies)
Discussion started by: cmccabe
4 Replies
MELTBUILD(1)						      General Commands Manual						      MELTBUILD(1)

NAME
melt - compiles Melt sources into DVI, PostScript or PDF files SYNOPSIS
meltbuild [OPTIONS] [OTHER_FILES] MAIN_FILE DESCRIPTION
meltbuild compiles Melt sources (.mlt files) into DVI, PostScript (.ps) or PDF files. It first calls the Melt preprocessor meltpp. It then calls the OCaml compiler, either directly or through Ocamlbuild or Mlpost. The program is linked with the Melt and Latex libraries. The program is then executed, producing .tex files. Then latex or pdflatex is called to produce the document. The MAIN_FILE is the main file of your document. It is the one which will be compiled, executed, and whose produced .tex file will be com- piled. OTHER_FILES will be copied into the _melt directory. They are additional files needed to compile your document, such as modules, class styles or included figures. If one OTHER_FILE has extension .mlt, it will also be pre-processed. Typically, a .mlt file has two usages. The first one is to define val- ues usable by the main .mlt file. The second one is to call the emit function to produce .tex files that can be included in your main .tex file. This is especially useful if your main .tex file is not written in Melt. Note that if you want an OTHER_FILE to be compiled and executed, you have to use it in the MAIN_FILE so that Ocamlbuild links it. If you do not use Ocamlbuild, multi-modules documents are not supported. OPTIONS
-meltpp <binary> Specify the location and name of the Melt pre-processor binary. -latop <binary> Specify the location and name of the Latop binary. -mlpost <binary> Specify the location and name of the Mlpost wrapper binary. -mlpost-no-prelude Do not pass a -latex option to the Mlpost wrapper. By default, the .tex file produced by your Melt document is given to Mlpost so it can compute a prelude to be used when compiling images. This option disables this behavior. The prelude is the contents of the .tex file before the document environment begins. -latex <binary> Specify the latex command to use. -P <path> Specify the location of pre-processor plugins. This option is passed to the Melt pre-processor. -I <path> Look for additional OCaml libraries in the given directory. This option is passed to the OCaml compiler. -L <path> Add a link to the path in the _melt directory. Useful if you don't want to copy the contents of the directory. -classic-display Give the -classic-display option to Ocamlbuild. Useful if your terminal does not handle the Ocamlbuild animation or if you want to keep a trace of the sequence of commands which are called. Has no effect if it is Mlpost that calls Ocamlbuild. -no-mlpost Do not use the Mlpost wrapper, call Ocamlbuild directly instead (or the OCaml compiler if -no-ocamlbuild is given too). Unspecified if your document produces Mlpost images. -no-ocamlbuild Do not use Ocamlbuild to compile your program. The OCaml compiler will be called directly. Usually only makes sense if your source code is made of only one file, and if you are using an OCaml version older than 3.10.2. -no-final Do not produce the final document, i.e. do not call latex. The MAIN_FILE will still be compiled and executed. -no-link By default, a symbolic link to the produced DVI, PS or PDF document is created in the current directory. This option disables this behavior. -native Compile the program to native code bytecode instead of bytecode. -dvi Produce a DVI instead of a PS file. -ps Produce a PS file. This is the default behavior. -pdf Produce a PDF instead of a PS file. -ps2pdf Produce a PS file, then convert it to PDF using ps2pdf. Useful if pdflatex won't compile your document. -cairo Use the Cairo backend of Mlpost, instead of Metapost. Implies -pdf. -mps Use the native MPS backend of Mlpost, instead of Metapost. Implies -pdf. -quiet, -q Be quiet. Less messages will be printed on the terminal, if any. -continue Continue on errors. -fake, -n Do not actually execute commands. Useful if you want to know what the Melt tool would execute to compile your document. -melt-dir <path> Change the name used for the _melt directory. -clean Remove the _melt directory and, if not -no-link, all symbolic links of the current directory linking into _melt. Cleaning is done before anything else. -version Print the version number of Melt. -- Pass the remaining arguments to the generated program. -help, --help Display the list of options SEE ALSO
meltpp(1), latop(1), mlpost(1), ocamlc(1), ocamlbuild(1), latex(1), pdflatex(1). AUTHOR
Melt was written by Romain Bardou. Contributors include Vincent Aravantinos, Francois Bobot, Pierre Chambart and Arnaud Spiwack. This manual page was written by Romain Bardou (but may be used by others). September 2010 MELTBUILD(1)
All times are GMT -4. The time now is 08:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy