Sponsored Content
Full Discussion: awk issue
Top Forums Shell Programming and Scripting awk issue Post 302737665 by Jared on Thursday 29th of November 2012 11:27:48 AM
Old 11-29-2012
i like to see output under hardware inventory which is like below...but you can see it only shows Hardware inventory line and thats it!
Code:
 
Item             Version  Part number  Serial number     Description
Chassis                                D3636             M320
Midplane         REV 08   710-009120   TS0977            M320 Midplane
FPM GBUS         REV 05   710-005928   XW5987            M320 Board
FPM Display      REV 05   710-009351   XS5720            M320 FPM Display
CIP              REV 05   710-005926   XW6402            M320 CIP
PEM 0            Rev 08   740-009148   VK57595           DC Power Entry Module
PEM 1            Rev 08   740-009148   VK57527           DC Power Entry Module
PEM 2            Rev 08   740-009148   VK57533           DC Power Entry Module
PEM 3            Rev 08   740-009148   VK57532           DC Power Entry Module
Routing Engine 0 REV 09   740-014082   9009041642        RE-A-2000


Last edited by vbe; 11-29-2012 at 12:46 PM.. Reason: code tags...
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk issue

Hi, # grep "^Listen" httpd.conf | awk '{print $2}' FrontEnd_1_IP:8081 FrontEnd_2_IP:8081 8081 8082 8083 # I need to get the values one at a time but I just can't manage to do that. Thanks, Bianca (20 Replies)
Discussion started by: potro
20 Replies

2. Shell Programming and Scripting

Awk issue

Can someone please explain below code. $LIST|awk ' /^$/ { next } substr($0,1,4)=="Exiting" { mk = 1; next } mk==1 { print $3,$7,$10,$14; exit } Cheers, gehlnar (5 Replies)
Discussion started by: gehlnar
5 Replies

3. Shell Programming and Scripting

Issue in awk

In the following code, Im trying to imbed many statements in a single awk statement. But it gives an error on that, for i in `less usage_types_dwh.txt` do cd /u01/app/evident/analysis_lab/usg_type grep $i svc_type.txt | head -1 | awk 'BEGIN {FS=","} {print $1 "==" $2 ":" $3 ":" $4;... (2 Replies)
Discussion started by: alishehzadpaul
2 Replies

4. Shell Programming and Scripting

Issue with AWK

I have this input file 0FB7,1083,Synchronized,FriNov121655,2816_7RAID5,05F:1_10F:1,10000000NoneNone,DC_db00p01 0FB7,1150,Split,MonApr180658,2816_7R5GC,N/A,N/A,N/A 06C4,0710,Synchronized,WedMar91105,2816_7RAID5,04E:1_11E:1,10000000NoneNone,DL_nb00p25... (1 Reply)
Discussion started by: greycells
1 Replies

5. Shell Programming and Scripting

awk NR issue

Hi guys, i am trying to analyze a text file using awk and am not able to solve this issue. This is the piece of code that I have written BEGIN { ## Time to count MACs -> 5 seconds. TIME_LIMIT = 5; k = 50000; } ## For every line. { time_in_seconds = $1... (2 Replies)
Discussion started by: jamie_123
2 Replies

6. Shell Programming and Scripting

AWK Issue

Hey, this is my code, cat $fulltrpath | while read line do inputfile=$(sed 1q $fulltrpath | awk '{ FS = "\t"; print $2$1}') outputpath=$(sed 1q $fulltrpath | awk '{ FS = "\t"; print $3 }') echo $inputfile echo $outputpath cp $inputfile $outputpath let path++ done if i... (1 Reply)
Discussion started by: inshafccna
1 Replies

7. Shell Programming and Scripting

issue trying to use awk

Hi Gurus, I am facing a similar issue usiung an awk command. Below is my requirement: ---DATA--- A;F;G A;D;E A;D;E B;Z;P C;Z;Q Expected: A F<TAB>G D<TAB>E D<TAB>E B D<TAB>E (1 Reply)
Discussion started by: rajangupta2387
1 Replies

8. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

9. Shell Programming and Scripting

awk - issue to get the right IP

On AIX 5.3 and AIX 6.1, I have this script for checking printers being pingable or not. for i in `lsallq` do echo "Queue Name: " $i echo "----------------------------------------" for j in `lsallqdev -q $i` do echo " Device Name:" $j hname=`echo... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

10. UNIX for Dummies Questions & Answers

Help with awk issue

OK, so I am trying to use awk as a method of accessing a table stored in a file to then provide the capability of a look up table. The table is stored in a file named "/Users/jhaney/Desktop/assetTypeMapping.tsv" and looks like this: aCategory aLetter aNumber AssetCat1 A 123 ... (10 Replies)
Discussion started by: jhaneyzz
10 Replies
scha_resourcegroup_get(1HA)				       Sun Cluster Commands				       scha_resourcegroup_get(1HA)

NAME
scha_resourcegroup_get - access resource group information SYNOPSIS
scha_resourcegroup_get -O optag -G group [args] DESCRIPTION
The scha_resourcegroup_get command accesses information about a resource group that is under the control of the Resource Group Manager (RGM) cluster facility. This command is intended to be used in shell script implementations of the callback methods for resource types. These resource types repre- sent services that are controlled by the cluster's RGM. This command provides the same information as the scha_resourcegroup_get(3HA) C function. Information is generated by the command to standard output (stdout) in formatted strings as described in scha_cmds(1HA). The output is a string or several strings on separate lines. The output can be stored in shell variables and parsed using shell facilities or awk(1) for further use by the script. You need solaris.cluster.resource.read role-based access control (RBAC) authorization to use this command. See rbac(5). You must also be able to assume a role to which the Sun Cluster Commands rights profile has been assigned to use this command. Authorized users can issue privileged Sun Cluster commands on the command line from the pfsh(1), pfcsh(1), or pfksh(1) profile shell. A profile shell is a special kind of shell that enables you to access privileged Sun Cluster commands that are assigned to the Sun Cluster Commands rights profile. A profile shell is launched when you run su(1M) to assume a role. You can also use pfexec(1) to issue privileged Sun Cluster com- mands. OPTIONS
The following options are supported: -G group Name of the resource group. -O optag Specifies the information that is to be accessed. Depending on the optag that you specify, you might need to include an addi- tional operand to indicate the node or zone for which information is to be retrieved. Note - optag values, such as DESIRED_PRIMARIES and FAILBACK, are not case sensitive. You can use any combination of uppercase and lowercase letters when you specify optag options. The following optag values retrieve the corresponding resource group properties. The value of the named property of the resource group is generated. The RG_STATE property refers to the value on the particular node or zone where the command is executed. AUTO_START_ON_NEW_CLUSTER DESIRED_PRIMARIES FAILBACK GLOBAL_RESOURCES_USED IMPLICIT_NETWORK_DEPENDENCIES MAXIMUM_PRIMARIES NODELIST PATHPREFIX PINGPONG_INTERVAL RESOURCE_LIST RG_AFFINITIES RG_DEPENDENCIES RG_DESCRIPTION RG_IS_FROZEN RG_MODE RG_PROJECT_NAME RG_SLM_TYPE RG_SLM_PSET_TYPE RG_SLM_CPU RG_SLM_CPU_MIN RG_STATE RG_STATE_NODE RG_SYSTEM SUSPEND_AUTOMATIC_RECOVERY Note - RG_STATE_NODE requires an unflagged argument that specifies a node or zone. This optag value generates the value of the resource group's RG_STATE property for the specified node or zone. If the unflagged argument specifies a non-global zone, the format is nodename:zonename. EXAMPLES
Example 1 A Sample Script Using scha_resourcegroup_get The following script is passed a -G argument, which provides the required resource group name. Next, the scha_resourcegroup_get command is used to get the list of resources in the resource group. #!/bin/sh while getopts G: opt do case $opt in G) group="$OPTARG";; esac done resource_list=`scha_resourcegroup_get -O Resource_list -G $group` for resource in $resource_list do printf "Group: %s contains resource: %s0 "$group" "$resource" done EXIT STATUS
The following exit status codes are returned: 0 The command completed successfully. nonzero An error occurred. Failure error codes are described scha_calls(3HA). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWscdev | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
awk(1), scha_cmds(1HA), scha_calls(3HA), scha_resourcegroup_get(3HA), attributes(5), rg_properties(5), rbac(5) Sun Cluster 3.2 6 Sep 2006 scha_resourcegroup_get(1HA)
All times are GMT -4. The time now is 11:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy