Sponsored Content
Top Forums Shell Programming and Scripting Vlookup using Ask from specific column from two files Post 303014808 by ranjancom2000 on Wednesday 21st of March 2018 09:57:12 AM
Old 03-21-2018
THis is original input file i need check the WWN from file1 and append the line if the WWn found. If not mark has notfound

Code:
Switch1, 381 12 45 F-Port 50:00:09:75:50:0d:bd:da
switch2, 8 8 3c0800 21:00:00:1b:32:12:8c:20
switch2, 9 9 3c0900 21:00:00:1b:32:9e:fe:ec
switch2, 10 10 3c0a00 21:00:00:24:ff:8b:e2:04
switch2, 12 12 3c0c00 21:00:00:24:ff:05:01:20
switch2, 13 13 3c0d00 21:00:00:24:ff:8b:e1:fe
switch3, 339 10 35 F-Port 50:00:09:75:00:0c:e9:d4
switch3, 340 10 36 F-Port 50:00:09:75:00:0c:e9:2c
switch3, 341 10 37 F-Port 50:00:09:75:00:0c:e9:6c
switch3, 342 10 38 F-Port 50:00:09:75:00:0c:e9:ac


New Input file was having like this

Code:
10.62.75.120, portIndex: 247 portName: slot12 port23,20:f1:0a:25:b5:03:02:90
10.62.75.120, portIndex: 247 portName: slot12 port23,20:50:00:2a:6a:00:b8:00 
10.62.75.120, portIndex: 247 portName: slot12 port23,20:50:00:2a:6a:00:b8:00 
10.62.75.120, portIndex: 247 portName: slot12 port23,21:00:00:24:ff:8b:e1:fe
10.62.75.120, portIndex: 247 portName: slot12 port23,20:50:00:2a:6a:00:b8:00

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Concatenate two files after a specific column

Hi I have two files, one is 1.6 GB. I would like to add one extra column of information to the large file at a specific location. After its 2nd column. For example: File 1 has two columns more than 1000 rows like this MM009987 1 File 2 looks like this MM00098 MM00076 3 4 2 4 2 1... (1 Reply)
Discussion started by: sogi
1 Replies

2. Shell Programming and Scripting

vlookup files

hi frnds i have 2 files. 1st is dddd and 2nd is ssss ==> dddd <==: 1,charit 2,gilhotra ==> ssss <==: 1,sajan 2,doda 3,hello and i want o/p ...mean join and vlookup both files sajan,charit (4 Replies)
Discussion started by: dodasajan
4 Replies

3. Shell Programming and Scripting

averaging specific column of multiple files

Hi all, I'm needing help again on scripting. I have weekly files with 3 columns, and I need to do monthly averaging on the values on column 3, the file naming convention is as follows: 20000105.u- 2000:year 01:month 05:day 20000112.u 20000119.u 20000126.u 20000202.u 20020209.u I need to... (15 Replies)
Discussion started by: ida1215
15 Replies

4. Shell Programming and Scripting

Divide data with specific column values into separate files

hello! i need a little help from you :) ... i need to split a file into separate files depending on two conditions using scripting. The file has no delimiters. The conditions are col 17 = "P" and col 81 = "*", this will go to one output file; col 17 = "R" and col 81 = " ". Here is an example. ... (3 Replies)
Discussion started by: chanclitas
3 Replies

5. Shell Programming and Scripting

Concatenating many files based on a specific column contents

Dear all, I have many files(.csv) in a directory. I want to concatenate the files which have similar entries in a particular column and save into a new file like result_datetime.csv etc. One example file is like below. Sno,Step,Data1,Data2,Data3 etc. 1,0,2,3,4 2,1,3,4,5 3,2,0,1,1 ... (4 Replies)
Discussion started by: ks_reddy
4 Replies

6. Shell Programming and Scripting

awk or sed to find specific column from different files

Hi everybody, I have a folder with many files: Files with 8 columns: X 123 A B C D E F And files with 7 columns: X1234 A B C D E F I am trying to find a way to extract the 5th column when the files have eight columns, or the 4th column when the files have... (3 Replies)
Discussion started by: Tzole
3 Replies

7. Shell Programming and Scripting

Overwrite specific column in xml file with the specific column from adjacent line

I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file. Here is the file. <!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies

8. Shell Programming and Scripting

Vlookup using Ask from specific column shell script

Input file1 frame1,dummy,server1, 00C1C N/A RDF1+TDEV RW 51789 frame1,dummy,server1, 00C1D N/A RDF1+TDEV RW 51789 frame1,dummy,server1, 00C1E N/A RDF1+TDEV RW 51789 frame1,dummy,server1, 00C1F N/A RDF1+TDEV RW 51789 frame1,dummy,server1, 00C20 N/A RDF1+TDEV RW 51789 frame1,dummy,server1,... (10 Replies)
Discussion started by: ranjancom2000
10 Replies

9. UNIX for Beginners Questions & Answers

Vlookup on 2 files - inserting vlookup command on another command

Hello, i am trying to print group name column(etc/group) on script (etc/passwd) since group name is not listed on etc/passwd columns. Im trying to do a vlookup. but i cant figure out how i can insert the vlookup command FNR==NR inside the print out command or the output. I also tried exporting... (2 Replies)
Discussion started by: joonisio
2 Replies

10. UNIX for Beginners Questions & Answers

How do I extract specific column in multiple csv files?

file1: Name,Threshold,Curr Samples,Curr Error%,Curr ART GETHome,100,21601,0.00%,47 GETregistry,100,21592,0.00%,13 GEThomeLayout,100,30466,0.00%,17 file2: Name,Threshold,Curr Samples,Curr Error%,Curr ART GETHome,100,21601,0.00%,33 GETregistry,100,21592,0.00%,22... (6 Replies)
Discussion started by: Raghuram717
6 Replies
HBA_SendRLS(3HBAAPI)			      Common Fibre Channel HBA Information Library Functions			      HBA_SendRLS(3HBAAPI)

NAME
HBA_SendRLS, HBA_SendRPL, HBA_SendRPS, HBA_SendSRL, HBA_SendLIRR - issue an Extended Link Service through the local HBA Port SYNOPSIS
cc [ flag... ] file... -lHBAAPI [ library... ] #include <hbaapi.h> HBA_STATUS HBA_SendRLS(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN destWWN, void * pRspBuffer, HBA_UINT32 *pRspBufferSize); HBA_STATUS HBA_SendRPL(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN agentWWN, HBA_UINT32 agent_domain, HBA_UINT32 portIndex, void * pRspBuffer, HBA_UINT32 *pRspBufferSize); HBA_STATUS HBA_SendRPS(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN agentWWN, HBA_UINT32 agent_domain, HBA_WWN object_wwn, HBA_UINT32 object_port_number, void * pRspBuffer, HBA_UINT32 *pRspBufferSize); HBA_STATUS HBA_SendSRL(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN wwn, HBA_UINT32 domain, void * pRspBuffer, HBA_UINT32 *pRspBufferSize); HBA_STATUS HBA_SendLIRR(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_WWN destWWN, HBA_UINT8 function, HBA_UINT8 type, void * pRspBuffer, HBA_UINT32 *pRspBufferSize); PARAMETERS
handle an open handle returned from HBA_OpenAdapter(3HBAAPI) hbaPortWWN HBA_SendRLS() the Port WWN of the local HBA through which to send the RLS HBA_SendRPL() the Port WWN of the local HBA through which to send the RPL HBA_SendRPS() the Port WWN of the local HBA through which to send the RPS HBA_SendSRL() the Port WWN of the local HBA through which to send the SRL HBA_SendLIRR() the Port WWN of the local HBA through which to send the LIRR destWWN HBA_SendRLS() the Port WWN of the remote Target to which the RLS is sent HBA_SendLIRR() he Port WWN of the remote Target to which the LIRR is sent wwn If non-zero, wwn is the port WWN to be scanned. If wwn is zero, it is ignored. domain If wwn is zero, domain is the domain number for which loops will be scanned. If wwn is non-zero, domain is ignored. agent_wwn If non-zero, agent_wwn is the port WWN for which the port list is requested. If agent_wwn is zero, it is ignored. agent_domain If agent_wwn is non-zero, agent_domain is the domain number and the domain controller for which the port list is requested. If agent_wwn is zero, it is ignored. port_index index of the first FC_Port returned in the response list object_wwn If non-zero, object_wwn is the port WWN for which the Port Status is requested. If object_wwn is zero, it is ignored. object_port_number If object_wwn is zero, object_port_number is the relative port number of the FC_Port for which the Port Status is requested. If object_wwn is non-zero, object_port_number is ignored. function the registration function to be performed type If type is non-zero, the type is the FC-4 device TYPE for which specific link incident information requested is requested. If type is zero, only common link incident information is requested. pRspBuffer HBA_SendRLS() a pointer to a buffer into which the RLS response is copied HBA_SendRPL() a pointer to a buffer into which the RPL response is copied HBA_SendRPS() a pointer to a buffer into which the RPS response is copied HBA_SendSRL() a pointer to a buffer into which the SRL response is copied HBA_SendLIRR() A pointer to a buffer into which the LIRRresponse is copied. RspBufferSize a pointer to the size of the buffer HBA_SendRLS() A size of 28 is sufficient for the largest response. HBA_SendLIRR() HBA_SendRPS() A size of 58 is sufficient for the largest response. HBA_SendSRL() A size of 8 is sufficient for the largest response. DESCRIPTION
The HBA_SendRLS() function returns the Link Error Status Block associated with the agent WWN or agent-domain. For more information see "Read Link Status Block (RLS)" in FC-FS. The HBA_SendRPL() function returns the Read Port List associated with the agent WWN or agent-domain. For more information see "Read Port List (RPL)" in FC-FS. The HBA_SendRPS() function returns the Read Port Status Block associated with the agent WWN or agent-domain. For more information see "Read Port Status Block(RPS)" in FC-FS. The HBA_SendSRL() function returns the Scan Remote Loop associated with the agent WWN or agent-domain. For more information see "Scan Remote Loop(SRL)" in FC-FS. The HBA_SendLIRR() function returns the Link Incident Record Registration associated with the destportWWN. For more information see "Link Incident Record Registration (LIRR) in FC-FS. RETURN VALUES
These functions return the following values: HBA_STATUS_OK The LS_ACC for the ELS has been returned. HBA_STATUS_ERROR_ELS_REJECT The ELS has been rejeced by the local HBA Port. HBA_STATUS_ERROR_ILLEGAL_WWN The value of hbaPortWWN is not a valid port WWN on the specified HBA. HBA_STATUS_ERROR An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-------------------------------------+ |Interface Stability |Standard: FC-MI 1.92 (API version 1) | +-----------------------------+-------------------------------------+ | |Standard: FC-HBA Version 4 (API ver- | | |sion 2) | +-----------------------------+-------------------------------------+ |MT-Level |Safe | +-----------------------------+-------------------------------------+ SEE ALSO
HBA_OpenAdapter(3HBAAPI), libhbaapi(3LIB), attributes(5) T11 FC-MI Specification SunOS 5.11 1 Sep 2003 HBA_SendRLS(3HBAAPI)
All times are GMT -4. The time now is 08:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy