Sponsored Content
Top Forums Shell Programming and Scripting Help with ksh script to display output with specific contents Post 302581387 by jayan_jay on Tuesday 13th of December 2011 05:39:32 AM
Old 12-13-2011
Based on your input file ..
Code:
for i in $(nawk '/Storage Group Name: /{print $NF}' infile)
do
        sed -n "/Storage Group Name: $i/,/Shareable/p" infile|nawk '/(Storage Group Name:)/{print $NF}/[0-9] [0-9]/{print $2}'
done

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

HTML display timing problem under ksh script

Using a HTML page , i'm running a Unix ksh script with <a href=..>. The script contains loop like this : for i in do rsh..... done each rsh command is running quite long and then i would display results in HTML format but about 5mn my blank page waiting for result is running in error... (1 Reply)
Discussion started by: Nicol
1 Replies

2. Shell Programming and Scripting

how to display an browser from ksh script

hy, i have an html file file1.html i want to display a browser i.e html file1 from a ksh script ------------------------------------------------------------------- #!/bin/ksh ----------------------------------------------\\ so can u tell me how to display file1.html as a browser.wat... (2 Replies)
Discussion started by: ali560045
2 Replies

3. Shell Programming and Scripting

Shell script or command help to extract specific contents from a long list of content

Hi, I got a long list of contents: >sequence_1 ASSSSSSSSSSSDDDDDDDDDDDCCCCCCC ASDSFDFFDFDFFWERERERERFSDFESFSFD >sequence_2 ASDFDFDFFDDFFDFDSFDSFDFSDFSDFDSFASDSADSADASD ASDFFDFDFASFASFASFAFSFFSDASFASFASFAFS >sequence_3 VEDFGSDGSDGSDGSDGSDGSDGSDG dDFSDFSDFSDFSDFSDFSDFSDFSDF... (2 Replies)
Discussion started by: patrick87
2 Replies

4. Shell Programming and Scripting

ksh help assigning specific values to variable in script

Hi - Help needed. I have an input file that looks something like this, but with a lot more entries: A Customer1 B 4500 C 8000 A Customer2 B 6422 C 8922 I need to be able to print details for each customer on one line per customer. ie. if I could print these to a file and then cat... (3 Replies)
Discussion started by: frustrated1
3 Replies

5. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

6. Shell Programming and Scripting

Grep a pattern given in one file at other file and display its corresponding contents as output.

***************************************** Right now i have this current system. I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which... (7 Replies)
Discussion started by: abinash
7 Replies

7. UNIX and Linux Applications

display which line returns specific output

Hi, I'm trying to figure out a way to find which line in my file.txt with IP addresses: 192.168.0.1 192.178.0.2 etc... returns specific result when I execute command affecting all lines. For example when I run: for line in `cat file.txt`; do snmpget $line done it displays the... (5 Replies)
Discussion started by: svetoslav_sj
5 Replies

8. Homework & Coursework Questions

Using ls or echo to display a specific output

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: What single command line would you enter to get the following output? 8140 drwxr-xr-x 9 root bin 18 Jan 20... (6 Replies)
Discussion started by: dasboot
6 Replies

9. UNIX for Dummies Questions & Answers

Display header in script output

Hi -- Working on my own through the book "Learning the KornShell and came to task 4-1, which there is: a script "highest" and it will sort an "album" file. highest filename The author mentions adding a header line to the scripts output if the user types in the -h option. It says "assume the... (9 Replies)
Discussion started by: Decoy Octopus88
9 Replies

10. Shell Programming and Scripting

How do we display specific row of an output from bottom given line number?

I pass a number to my script. Passing "1" below. ./getfile.sh 1 echo "User entered: $1" ls -ltr *.conf | sed -n '$p' I wish to use ls -ltr i.e list files in ascending order of time the latest showing at the bottom of the output. Number 1 should get me the last row of ls -ltr output i.e... (9 Replies)
Discussion started by: mohtashims
9 Replies
DBIx::Class::Storage::Statistics(3)			User Contributed Perl Documentation		       DBIx::Class::Storage::Statistics(3)

NAME
DBIx::Class::Storage::Statistics - SQL Statistics SYNOPSIS
DESCRIPTION
This class is called by DBIx::Class::Storage::DBI as a means of collecting statistics on its actions. Using this class alone merely prints the SQL executed, the fact that it completes and begin/end notification for transactions. To really use this class you should subclass it and create your own method for collecting the statistics as discussed in DBIx::Class::Manual::Cookbook. METHODS
new Returns a new DBIx::Class::Storage::Statistics object. debugfh Sets or retrieves the filehandle used for trace/debug output. This should be an IO::Handle compatible object (only the "print" method is used). Initially should be set to STDERR - although see information on the DBIC_TRACE environment variable. As getter it will lazily open a filehandle for you if one is not already set. print Prints the specified string to our debugging filehandle. Provided to save our methods the worry of how to display the message. silence Turn off all output if set to true. txn_begin Called when a transaction begins. txn_rollback Called when a transaction is rolled back. txn_commit Called when a transaction is committed. svp_begin Called when a savepoint is created. svp_release Called when a savepoint is released. svp_rollback Called when rolling back to a savepoint. query_start Called before a query is executed. The first argument is the SQL string being executed and subsequent arguments are the parameters used for the query. query_end Called when a query finishes executing. Has the same arguments as query_start. AUTHOR AND CONTRIBUTORS
See AUTHOR and CONTRIBUTORS in DBIx::Class LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.18.2 2013-12-16 DBIx::Class::Storage::Statistics(3)
All times are GMT -4. The time now is 04:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy