05-08-2008
selecting the stanza fields
Hi Friends,
I have a stanza file as below :
CuDv:
name = "hdisk34"
status = 0
chgstatus = 3
ddins = "scsidisk"
location = "06-08-02"
parent = "fscsi0"
connwhere = "W_0"
PdDvLn = "disk/fcp/mpioosdisk"
CuDv:
name = "hdisk10"
status = 1
chgstatus = 0
ddins = "scsidisk"
location = "06-08-02"
parent = "fscsi0"
connwhere = "W_0"
PdDvLn = "disk/fcp/mpioosdisk"
CuDv:
name = "hdisk11"
status = 0
chgstatus = 0
ddins = "scsidisk"
location = "06-08-02"
parent = "fscsi1"
connwhere = "W_0"
PdDvLn = "disk/fcp/mpioosdisk"
CuDv:
name = "hdisk12"
status = 1
chgstatus = 0
ddins = "scsidisk"
location = "06-08-02"
parent = "fscsi1"
connwhere = "W_0"
PdDvLn = "disk/fcp/mpioosdisk"
I want the name and the parent fields only if the field "status=1"
i.e.,
hdisk10 fscsi0
hdisk12 fscsi1
( It should not show the disks hdisk34 and hdisk11 as their "status not equal to 1" ).
Urgent reply required..
Thanks in advance
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
I have a file as below :
machine1:
abc
xyz
qwerty
machine2:
jkl
mno
machine3:
hhh
kkk
qwerty
Now ...i need to find all the stanza names that have the pattern "qwerty'"
in it...( i need to get the output as machine1 and machine3 since... (4 Replies)
Discussion started by: vijaya2006
4 Replies
2. Shell Programming and Scripting
I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want.
The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies
3. Shell Programming and Scripting
Hi,
I have a file with following lines:
chr1 10 AC=2;AF=1.00;AN=2;DP=2;Dels=0.00;HRun=0;HaplotypeScore=0.00;MQ=23.00;MQ0=0;QD=14.33;SB=-10.01
chrX 18 AB=0.52;AC=1;AF=0.50;AN=2;DP=203;DS;Dels=0.00;HRun=0;HaplotypeScore=20.01;MQ=15.63;MQ0=85;QD=12.80;SB=-1289.58
I need to extract 4... (2 Replies)
Discussion started by: menenuh
2 Replies
4. Shell Programming and Scripting
Hi experts,
I need to print the first field first then last two fields should come next and then i need to print rest of the fields.
Input :
a1,abc,jsd,fhf,fkk,b1,b2
a2,acb,dfg,ghj,b3,c4
a3,djf,wdjg,fkg,dff,ggk,d4,d5
Expected output:
a1,b1,b2,abc,jsd,fhf,fkk... (6 Replies)
Discussion started by: 100bees
6 Replies
5. Shell Programming and Scripting
I'm trying to compare 2 files for differences in a selct number of fields. When differnces are found it will write the whole record of the second file including appending '|C' out to a delta file. Each record will have 20 fields, but only want to do comparison of 1st 15 fields. The 1st field of... (7 Replies)
Discussion started by: sljnk
7 Replies
6. AIX
The default: stanza in /etc/security/limits is still set to 2097151 on fsize (max file size). I know tar had issues with large files but is there any other reasons for it? I'm thinking yes since it's still set to that by IBM.
Cheers,
DH (4 Replies)
Discussion started by: Devyn
4 Replies
7. Shell Programming and Scripting
Hi
I have a file as below
<field1> <field2> <field3> ... <field_num1> <field_num2>
Trying to sort based on difference of <field_num1> and <field_num2> in desceding order and print all fields.
I tried this and it doesn't sort on the difference field .. Appreciate your help.
cat... (9 Replies)
Discussion started by: newstart
9 Replies
8. Shell Programming and Scripting
Hello friends,
I have a text file with lot of stanzas with each starting with "O-O-O.
Sample file :-
1. d4 Nf6 2. c4 g6 3. Nc3 d5 4. cxd5 Nxd5 5. e4 Nxc3 6. bxc3 Bg7 7. Nf3 c5 8.
Rb1 O-O 9. Be2 cxd4 10. cxd4 Qa5+ 11. Bd2 Qxa2 12. O-O Bg4 13. Bg5 h6 14. Be3 (8 Replies)
Discussion started by: prvnrk
8 Replies
9. Shell Programming and Scripting
As it was ultimately Don Craguns idea that saved the whole project i can as well give something back to the community. This is my stanza file parser, which was written only using ksh without any external programs.
The stanza structure
There is some inconsistency as to what exactly is meant by... (0 Replies)
Discussion started by: bakunin
0 Replies
10. UNIX for Beginners Questions & Answers
Hi,
Below are the sample files. x.txt is from an Excel file that is a list of users from Windows and y.txt is a list of database account.
$ head -500 x.txt y.txt
==> x.txt <==
TEST01 APP_USER_PROFILE
USER03 APP_USER_PROFILE
TEST02 APP_USER_EXP_PROFILE
TEST04 APP_USER_PROFILE
USER01 ... (3 Replies)
Discussion started by: newbie_01
3 Replies
LEARN ABOUT DEBIAN
debian::control::stanza::source
Debian::Control::Stanza::Source(3pm) User Contributed Perl Documentation Debian::Control::Stanza::Source(3pm)
NAME
Debian::Control::Stanza::Source - source stanza of Debian source package control file
SYNOPSIS
my $src = Debian::Control::Stanza::Source->new(\%data);
print $src; # auto-stringification
print $src->Build_Depends; # Debian::Dependencies object
DESCRIPTION
Debian::Control::Stanza::Source can be used for representation and manipulation of "Source:" stanza of Debian source package control files
in an object-oriented way. Converts itself to a textual representation in string context.
FIELDS
The supported fields for source stanzas are listed below. For more information about each field's meaning, consult the section named
"Source package control files -- debian/control" of the Debian Policy Manual at http://www.debian.org/doc/debian-policy/
<http://www.debian.org/doc/debian-policy/>
Note that real control fields may contain dashes in their names. These are replaced with underscores.
Source
Section
Priority
Maintainer
Uploaders
DM_Upload_Allowed
Build_Conflicts
Build_Conflicts_Indep
Build_Depends
Build_Depends_Indep
Standards_Version
Vcs_Browser
Vcs_Bzr
Vcs_CVS
Vcs_Git
Vcs_Svn
Homepage
XS_Autobuild
All Build_... fields are converted into objects of Debian::Dependencies class upon construction.
CONSTRUCTOR
new
new( { field => value, ... } )
Creates a new Debian::Control::Stanza::Source object and optionally initializes it with the supplied data.
SEE ALSO
Debian::Control::Stanza::Source inherits most of its functionality from Debian::Control::Stanza
COPYRIGHT & LICENSE
Copyright (C) 2009 Damyan Ivanov dmn@debian.org
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
perl v5.14.2 2012-01-15 Debian::Control::Stanza::Source(3pm)