Sponsored Content
Top Forums Shell Programming and Scripting help needed to get the output from file Post 302684781 by RudiC on Friday 10th of August 2012 04:33:26 AM
Old 08-10-2012
This will do the job for your example:
Code:
awk    'BEGIN {RS="/"; FS="[= \"]+"}
     /Adapter/ {
            for (i=NF;i>=1;i--) if ($i=="Adapter") break;
            sub("cluster_interconnect","Private"ct++,$(i+3))
            print $(i+3), "Adapter =", $(i+1)
           }
    ' infile

Code:
public Adapter = en0
Private1 Adapter = en1
Private2 Adapter = en2

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Output formatting help needed.

Hi guys , I have a file which contains following string.(filename tempdisplay) (location 0.0.0.0:5900) i needed to write a script which will extract the string that comes after 0.0.0.0 i.e the string :5900. I have used following method to extract the string :5900 .Is it a preferred way of... (4 Replies)
Discussion started by: pinga123
4 Replies

2. Solaris

showrev output explanation needed

hi this is the output of showrev command from my sun blade 150 machine. bash-3.00# showrev Hostname: u15_9 Hostid: 83685284 Release: 5.10 Kernel architecture: sun4u Application architecture: sparc Hardware provider: Sun_Microsystems Domain: sun.com Kernel version: SunOS 5.10... (1 Reply)
Discussion started by: kingston
1 Replies

3. UNIX for Dummies Questions & Answers

Help Needed with Sorting Output

Hi all, I'm using Solaris 10, and need help in sorting the below output from the syslog file in descending rather than ascending order. I would like both the hostname and message columns to be sorted, but right now only the message is sorted and the count column, whose order I would like... (2 Replies)
Discussion started by: wthomas
2 Replies

4. UNIX for Dummies Questions & Answers

Grep output help needed

According to linux hardening guide a PATH variable must not contain . or .. so i grep the path variable using. # echo $PATH | grep "." /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin # echo $PATH | grep ".."... (2 Replies)
Discussion started by: pinga123
2 Replies

5. Shell Programming and Scripting

Help needed with file output awk sed command - please

Hi I have a file that contains lines starting with a particular string plus a Colon: I need to output all these lines but only what comes after the colon Can you pelase assist? Example of lines in the file: com.ubs.f35.cashequities/cashequities: 1 2 ... (5 Replies)
Discussion started by: mnassiri
5 Replies

6. Shell Programming and Scripting

Help!! needed to get the desired output

Am in need of your help to get the desired output. nameSECURITY.SERVICES.CONFIG:GETVALUEisPrefetchedNsAccessLast2013-09-13 10:50:13 MESTsAccessTotal1sRunningcHitLastnamePUBLIC.SERVER:INVOKEisPrefetchedNsAccessLast2013-09-17 15:02:05... (5 Replies)
Discussion started by: rocky2013
5 Replies

7. Shell Programming and Scripting

Help needed in formatting the Output file

Hi All, Need your help in resolving the below issue. I've a file called "data.txt" with the below lines: TT: <tell://me/sreenivas> <tell://me/100> TT: <tell://me/sudheer> <tell://me/300> TT: <tell://me/sreenivas> <tell://me/200> TT: <tell://me/sudheer> <tell://me/400> ... (3 Replies)
Discussion started by: raosr020
3 Replies

8. Shell Programming and Scripting

Help needed in formatting the output

Hi All, Need your help in resolving the below issue. I've a file called "data.txt" with the below lines: TT: <tell://me/sreenivas> <tell://me/100> <tell://me/500> TT: <tell://me/sudheer> <tell://me/300> TT: <tell://me/sreenivas> <tell://me/200> TT:... (6 Replies)
Discussion started by: raosr020
6 Replies

9. Shell Programming and Scripting

Oracle pmon output needed

$ ps -ef | grep pmon | grep -v grep | awk '{ print $8 }' | cut -d '_' -f3 abc1 abc2 abc3 abc4 abc5 +ASM1 Please use code tags from above output i am looking exclude +ASM output and restout put is fine , also when i select any output and if is invalid from above output, shell script... (12 Replies)
Discussion started by: amar1208
12 Replies

10. UNIX for Beginners Questions & Answers

Screen Output Needed on every execution

Hi , A shell script being executed by multiple user in a host, but i need the output of each user who executed the script user should have screen output as well ...and unique log file name should generated on execution of script is there anyway to get it below file will overwrite... (5 Replies)
Discussion started by: amar1208
5 Replies
Net::EPP::Frame::Command::Delete::Contact(3pm)		User Contributed Perl Documentation	    Net::EPP::Frame::Command::Delete::Contact(3pm)

NAME
Net::EPP::Frame::Command::Delete::Contact - an instance of Net::EPP::Frame::Command::Delete for contact objects. SYNOPSIS
use Net::EPP::Frame::Command::Delete::Contact; use strict; my $delete = Net::EPP::Frame::Command::Delete::Contact->new; $delete->setContact('contact-id'); print $delete->toString(1); This results in an XML document like this: <?xml version="1.0" encoding="UTF-8"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0 epp-1.0.xsd"> <command> <delete> <contact:delete xmlns:contact="urn:ietf:params:xml:ns:contact-1.0" xsi:schemaLocation="urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd"> <contact:name>contact-idE<lt>/contact:name> </contact:delete> </delete> <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt> </command> </epp> OBJECT HIERARCHY
L<XML::LibXML::Node> +----L<XML::LibXML::Document> +----L<Net::EPP::Frame> +----L<Net::EPP::Frame::Command> +----L<Net::EPP::Frame::Command::Delete> +----L<Net::EPP::Frame::Command::Delete::Contact> METHODS
$frame->setContact($domain_name); This specifies the contact object to be deleted. AUTHOR
CentralNic Ltd (http://www.centralnic.com/). COPYRIGHT
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o Net::EPP::Frame perl v5.14.2 2012-04-23 Net::EPP::Frame::Command::Delete::Contact(3pm)
All times are GMT -4. The time now is 04:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy