Sponsored Content
Top Forums Shell Programming and Scripting Need help in search for word and return line Post 302619973 by jakSun8 on Friday 6th of April 2012 02:56:19 PM
Old 04-06-2012
That's amazing! .. thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

to get a line above the search word

Hi Everyone. I want to get all the lines above the word error. Note some records dont have error. ex Input Rec # 2384 Client: BGA Rx No: 0735845 Error: (W)Submit Date before Fill Date(SUBMIT-DATE) I want to have the line which starts with... (16 Replies)
Discussion started by: sachin.gangadha
16 Replies

2. UNIX for Dummies Questions & Answers

query on how to search for a line and read 4th word from that line

Assume I have a text file as below: me con pi ind ken pras ur me con rome ind kent pras urs pintu con mys ind pan pras ki con kit ind sys My requirement, I need to search for "con rome" and if exists, then print 4th word from rome, i.e in above example, since "con rome"... (4 Replies)
Discussion started by: jaggesh
4 Replies

3. Shell Programming and Scripting

How to search word and get the line above it.

Hey all, Could any one help me ... I want to search the word and want the line above it. eg. mytxt.log My name is Jeevan. 240 is my address. My name is Jhon. 390 is my address. -------- i want to search "240" and want output as My name is Jeevan. 240 is my address. ... (7 Replies)
Discussion started by: Jeevan Salunke
7 Replies

4. Shell Programming and Scripting

Search string and return only the 5th line

I have looked at almost every posting on here regarding, grep, sed, awk, nawk, perl methods to perform this function, but they are just not returning the results I hope to see. Example File: abcdef 123456 ghijkl 7890123 7890123 7890123 7890123 mnopqrs 456789 This is the most... (4 Replies)
Discussion started by: doza22
4 Replies

5. Shell Programming and Scripting

Search word in a line and print earlier pattern match

Hi All, I have almost 1000+ files and I want to search specific pattern. Looking forwarded your input. Search for: word1.word2 (Which procedure contain this word, I need procedure name in output. Expected output: procedure test1 procedure test2 procedure test3 procedure test4 ... (7 Replies)
Discussion started by: susau_79
7 Replies

6. UNIX for Dummies Questions & Answers

Can grep command return word instead of complete line

Hi Is there any way GREP command can return word and not complete line. My file has following data: Hello Everyone I am NitinrajSrivastava Hi Friends Welcome VrajSrivastava I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'. Required... (11 Replies)
Discussion started by: dashing201
11 Replies

7. Shell Programming and Scripting

search a string in a particular column of file and return the line number of the line

Hi All, Can you please guide me to search a string in a particular column of file and return the line number of the line where it was found using awk. As an example : abc.txt 7000,john,2,1,0,1,6 7001,elen,2,2,0,1,7 7002,sami,2,3,0,1,6 7003,mike,1,4,0,2,1 8001,nike,1,5,0,1,8... (3 Replies)
Discussion started by: arunshankar.c
3 Replies

8. Shell Programming and Scripting

Read a File line by line and split into array word by word

Hi All, Hope you guys had a wonderful weekend I have a scenario where in which I have to read a file line by line and check for few words before redirecting to a file I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies

9. Shell Programming and Scripting

Find word in a line and output in which line the word occurs / no. of times it occurred

I have a file: file.txt, which contains the following data in it. This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt My name is not Karl, my name is Karl Joey What is your name? Do you know your name and... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies

10. UNIX for Beginners Questions & Answers

Search for word in huge logfile and need to continue to print few lines from that line til find date

Guys i need an idea for one logic..in shell scripting am struggling with a logic...So the thing is... i need to search for a word in a huge log file and i need to continue to print few more lines from that line and the consecutive line has to end when it finds the line with date..because i know... (1 Reply)
Discussion started by: Prathi
1 Replies
SQL::Translator::Producer::GraphViz(3pm)		User Contributed Perl Documentation		  SQL::Translator::Producer::GraphViz(3pm)

NAME
SQL::Translator::Producer::GraphViz - GraphViz producer for SQL::Translator SYNOPSIS
use SQL::Translator; my $trans = SQL::Translator->new( from => 'MySQL', # or your db of choice to => 'GraphViz', producer_args => { out_file => 'schema.png', bgcolor => 'lightgoldenrodyellow', show_constraints => 1, show_datatypes => 1, show_sizes => 1 } ) or die SQL::Translator->error; $trans->translate or die $trans->error; DESCRIPTION
Creates a graph of a schema using the amazing graphviz (see http://www.graphviz.org/) application (via the GraphViz module). It's nifty--you should try it! PRODUCER ARGS
All GraphViz constructor attributes are accepted and passed through to "new" in GraphViz. The following defaults are assumed for some attributes: layout => 'dot', overlap => 'false', node => { shape => 'record', style => 'filled', fillcolor => 'white', }, # in inches width => 8.5, height => 11, See the documentation of "new" in GraphViz for more info on these and other attributes. In addition this producer accepts the following arguments: o skip_tables An arrayref or a comma-separated list of table names that should be skipped. Note that a skipped table node may still appear if another table has foreign key constraints pointing to the skipped table. If this happens no table field/index information will be included. o skip_tables_like An arrayref or a comma-separated list of regular expressions matching table names that should be skipped. o cluster Clustering of tables allows you to group and box tables according to function or domain or whatever criteria you choose. The syntax for clustering tables is: cluster => 'cluster1=table1,table2;cluster2=table3,table4' Or pass it as an arrayref like so: cluster => [ 'cluster1=table1,table2', 'cluster2=table3,table4' ] Or like so: cluster => [ { name => 'cluster1', tables => [ 'table1', 'table2' ] }, { name => 'cluster2', tables => [ 'table3', 'table4' ] }, ] o out_file The name of the file where the resulting GraphViz output will be written. Alternatively an open filehandle can be supplied. If undefined (the default) - the result is returned as a string. o output_type (DEFAULT: 'png') This determines which output method will be invoked to generate the graph: "png" translates to "as_png", "ps" to "as_ps" and so on. o fontname This sets the global font name (or full path to font file) for node, edge, and graph labels o fontsize This sets the global font size for node and edge labels (note that arbitrarily large sizes may be ignored due to page size or graph size constraints) o show_fields (DEFAULT: true) If set to a true value, the names of the colums in a table will be displayed in each table's node o show_fk_only If set to a true value, only columns which are foreign keys will be displayed in each table's node o show_datatypes If set to a true value, the datatype of each column will be displayed next to each column's name; this option will have no effect if the value of "show_fields" is set to false o friendly_ints If set to a true value, each integer type field will be displayed as a tinyint, smallint, integer or bigint depending on the field's associated size parameter. This only applies for the "integer" type (and not the "int" type, which is always assumed to be a 32-bit integer); this option will have no effect if the value of "show_fields" is set to false o friendly_ints_extended If set to a true value, the friendly ints displayed will take into account the non-standard types, 'tinyint' and 'mediumint' (which, as far as I am aware, is only implemented in MySQL) o show_sizes If set to a true value, the size (in bytes) of each CHAR and VARCHAR column will be displayed in parentheses next to the column's name; this option will have no effect if the value of "show_fields" is set to false o show_constraints If set to a true value, a field's constraints (i.e., its primary-key-ness, its foreign-key-ness and/or its uniqueness) will appear as a comma-separated list in brackets next to the field's name; this option will have no effect if the value of "show_fields" is set to false o show_indexes If set to a true value, each record will also show the indexes set on each table. It describes the index types along with which columns are included in the index. o show_index_names (DEFAULT: true) If "show_indexes" is set to a true value, then the value of this parameter determines whether or not to print names of indexes. if "show_index_names" is false, then a list of indexed columns will appear below the field list. Otherwise, it will be a list prefixed with the name of each index. o natural_join If set to a true value, "make_natural_joins" in SQL::Translator::Schema will be called before generating the graph. o join_pk_only The value of this option will be passed as the value of the like-named argument to "make_natural_joins" in SQL::Translator::Schema; implies "natural_join => 1" o skip_fields The value of this option will be passed as the value of the like-named argument to "make_natural_joins" in SQL::Translator::Schema; implies "natural_join => 1" DEPRECATED ARGS o node_shape Deprecated, use node => { shape => ... } instead o add_color Deprecated, use bgcolor => 'lightgoldenrodyellow' instead If set to a true value, the graphic will have a background color of 'lightgoldenrodyellow'; otherwise the default white background will be used o nodeattrs Deprecated, use node => { ... } instead o edgeattrs Deprecated, use edge => { ... } instead o graphattrs Deprecated, use graph => { ... } instead AUTHOR
Ken Youens-Clark <kclark@cpan.org> Jonathan Yu <frequency@cpan.org> SEE ALSO
SQL::Translator, GraphViz perl v5.14.2 2012-01-18 SQL::Translator::Producer::GraphViz(3pm)
All times are GMT -4. The time now is 11:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy