Sponsored Content
Top Forums Shell Programming and Scripting How to pull info under headers in file(awk,grep,while loop) Post 302384290 by rdcwayx on Monday 4th of January 2010 06:26:40 PM
Old 01-04-2010
could you paste your desired output?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

trying to write a script to loop through a port info file

Below is part of a script i have written to loop through part of a port info file. How do i continue the script to get info for OS Device Name, manufacturer and then put information into an array? HBA Port WWN: 10000000c9420b4b OS Device Name: /dev/cfg/c10 Manufacturer: Emulex... (5 Replies)
Discussion started by: rcon1
5 Replies

2. UNIX for Dummies Questions & Answers

Using awk (or whatever) to pull and append data in a new file

One of the fortunate things about posting in a "Dummies" forum is you probably aren't expecting a lot of out me... I'm trying to pull fields from two lines in the same file(s), and then append them together in a new file. So...I get a nice line-by-line of the first bit of data I'm looking... (6 Replies)
Discussion started by: Milano_EH3
6 Replies

3. Shell Programming and Scripting

script to pull info from my email?

Hi, I need help writing a script that would pull info from an email inbox and add it to an Evolution Calendar. I'm pretty sure I can google the commands to add the info to the calendar. The part that I really need help with is getting the info from the email into the command. Basically for... (6 Replies)
Discussion started by: xinix
6 Replies

4. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

5. UNIX for Dummies Questions & Answers

Grep Headers

Hi! Trying to find string and then put the above Headers of corresponding fist line. After executing a Property command a get this output: SP/CH-CH Span Name Type TG Idle InUse OffHk OnHk Ring -------- ------------------------------ ------ ---- ----- ----- ----- 02/01-24 CARRIERSS7... (6 Replies)
Discussion started by: Joel_john
6 Replies

6. Shell Programming and Scripting

Cat 114 files using grep or awk to pull muliple fields

Files xxxxxxx.txt ------------------------------------------------------------------------------------------------------------------------------------ Req.By: xxxxxxx WABUSH MINES - xxxxxx MINE (1001) Page: 1 Run on: 12/14/09... (4 Replies)
Discussion started by: sctxms
4 Replies

7. Shell Programming and Scripting

Remove interspersed headers in .dat file with AWK

Heya there, A small selection of my data is shown below. DATE TIME FRAC_DAYS_SINCE_JAN1 2011-06-25 08:03:20.000 175.33564815 2011-06-25 08:03:25.000 175.33570602 2011-06-25 ... (4 Replies)
Discussion started by: gd9629
4 Replies

8. Shell Programming and Scripting

Script to loop line in a file and add info or do echo

I have a record.txt it will update weekly, and it could be 2 lines or more ... it just echo each line to the script san jose,23.34% tampa,2.15% dallas,30.20% seattle,44.29% Unknown,16.72% How do i write a shell script to give me a test.pl or bash file which contain #!/home/perl... (8 Replies)
Discussion started by: sabercats
8 Replies

9. UNIX for Dummies Questions & Answers

Pull out multiple lines with grep patternfile

Hi, I'm trying to get lines from a file using identifiers in the first two columns. I have used: cat MasterFile.txt | grep -f Pattern.txt and the lines I want display on screen. If I try to put them in a file the file is created but stays empty: cat MasterFile.txt | grep -f Pattern.txt... (14 Replies)
Discussion started by: FGPonce
14 Replies

10. Shell Programming and Scripting

Grep/awk part of info of a column

I have a question that I am at a loss to solve. I have 3 column tab-separated data, such as: abs nmod+n+n-commitment-n 349.200023 abs nmod+n+n-a-commitment-n 333.306429 abs into+ns-j+vn-pass-rb-divide-v 295.57316 abs nmod+n+ns-commitment-n 182.085018 abs nmod+n+n-pledge-n ... (2 Replies)
Discussion started by: owwow14
2 Replies
HBA_OpenAdapter(3HBAAPI)		      Common Fibre Channel HBA Information Library Functions			  HBA_OpenAdapter(3HBAAPI)

NAME
HBA_OpenAdapter, HBA_OpenAdapterByWWN, HBA_CloseAdapter - open and close a specific adapter SYNOPSIS
cc [ flag... ] file... -lHBAAPI [ library... ] #include <hbaapi.h> HBA_HANDLE HBA_OpenAdapter(char *adaptername); HBA_STATUS HBA_OpenAdapterByWWN(HBA_HANDLE *handle, HBA_WWN wwn); void HBA_CloseAdapter(HBA_HANDLE handle); PARAMETERS
adaptername the name of the adapter to open, as returned by HBA_GetAdapterName(3HBAAPI) handle HBA_OpenAdapterByWWN() a pointer to an HBA_HANDLE HBA_CloseAdapter() the open handle of the adapter to close, as returned by HBA_OpenAdapter(3HBAAPI) wwn the WWN to match the Node WWN or Port WWN of the HBA to open DESCRIPTION
The HBA_OpenAdapter() function opens the adapter specified by adaptername and returns a handle used for subsequent operations on the HBA. The HBA_OpenAdapterByWWN() function opens a handle to the HBA whose Node or Port WWN matches the wwn argument. The HBA_CloseAdapter() function closes the open handle. RETURN VALUES
Upon successful completion, HBA_OpenAdapter() returns a valid HBA_HANDLE with a numeric value greater than 0. Otherwise, 0 is returned. The HBA_OpenAdapterByWWN() function returns the following values: HBA_STATUS_OK The handle argument contains a valid HBA handle. HBA_STATUS_ERROR_ILLEGAL_WWN The wwn argument is not a valid port WWN on the specified HBA. HBA_STATUS_ERROR_AMBIGUOUS_WWN The WWN is matched to multiple adapters. HBA_STATUS_ERROR An error occurred while opening the adapter. EXAMPLES
Example 1: Open an adapter. The following example opens the specified adapter. handle = HBA_OpenAdapter(adaptername); if (handle == 0) { fprintf(stderr, "Unable to open HBA %d with name " ""%s". ", hbaCount, adaptername); continue; } 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 version 2) | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
HBA_GetAdapterName(3HBAAPI), HBA_OpenAdapter(3HBAAPI), libhbaapi(3LIB), attributes(5) T11 FC-MI Specification SunOS 5.10 1 Sep 2003 HBA_OpenAdapter(3HBAAPI)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy