01-23-2008
thanks, that worked great!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi experts,
You cool guys already given me the awk script below-
awk '/9366109380/,printed==5 { ++printed; print; }' 2008-09-14.0.log
Morever, i have one more things-
when i awk 9366109380, i can also see the Upper 3 lines as well as below 5 lines of that string.
Line 1.... (3 Replies)
Discussion started by: thepurple
3 Replies
2. Shell Programming and Scripting
Input File:
nawk -F "|" '{
for(i=1;i<=NF;i++) {
if (i == 2)
{gsub(",","#",$i);z=split($i,a,"")}
else if (i == 3)
{gsub(",","#",$i);z=split($i,b,"")}
}
if(z > 0) for(i=1;i<=z;i++)
print $1,a,"Test";
if(w > 0) for(j=1;j<=w;j++)
... (1 Reply)
Discussion started by: pinnacle
1 Replies
3. Shell Programming and Scripting
Hello, I have only recently begun with awk and need to write this:
I have an input consisting of a couple of letters, a space and a number followed by various other characters:
fiRcQ 9( )
klsRo 9( ) pause
fiRcQ 9( ) pause
klsRo continue 1
aPLnJ 62( )
fiRcQ continue 5
... and so on
I... (7 Replies)
Discussion started by: Borghal
7 Replies
4. Shell Programming and Scripting
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
5. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
6. Shell Programming and Scripting
How to remove x lines form top and y lines form bottom.
This works, but like awk only cat file | head -n-y | awk 'NR>(x-1)'
so remove last 3 lines and 5 firstcat file | head -n-3 | awk 'NR>4' (5 Replies)
Discussion started by: Jotne
5 Replies
7. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
8. Shell Programming and Scripting
Hello all,
I have a large csv file where there are four types of rows I need to merge into one row per person, where there is a column for each possible code / type of row, even if that code/row isn't there for that person.
In the csv, a person may be listed from one to four times... (9 Replies)
Discussion started by: RalphNY
9 Replies
9. Shell Programming and Scripting
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
Discussion started by: cmccabe
12 Replies
10. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
LEARN ABOUT HPUX
hba_getbindingcapability
HBA_GetBindingCapability(3HBAAPI) Common Fibre Channel HBA Information Library Functions HBA_GetBindingCapability(3HBAAPI)
NAME
HBA_GetBindingCapability, HBA_GetBindingSupport, HBA_SetBindingSupport - return and sets binding capabilities on an HBA port
SYNOPSIS
cc [ flag... ] file... -lHBAAPI [ library... ]
#include <hbaapi.h>
HBA_HANDLE HBA_GetBindingCapability(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_BIND_CAPABILITY *pFlags);
HBA_STATUS HBA_GetBindingSupport(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_BIND_CAPABILITY *pFlags);
void HBA_SetBindingSupport(HBA_HANDLE handle, HBA_WWN hbaPortWWN, HBA_BIND_CAPABILITY Flags);
PARAMETERS
handle an open handle returned from HBA_OpenAdapter(3HBAAPI)
hbaPortWWN the Port WWN of the local HBA through which the binding capabilities implemented by the HBA is returned
pFlags a pointer to an HBA_BIND_CAPABILITY structure that returns the persistent binding capabilites implemented by the HBA
Flags an HBA_BIND_CAPABILITY structure containing the persistent binding capabilites to enable for the HBA
DESCRIPTION
The HBA_GetBindingCapability() function returns the binding capabilities implemented by the HBA.
The HBA_GetBindingSupport() function returns the currently enabled binding capabilities for the HBA.
The HBA_SetBindingSupport() function sets the currently enabled binding capabilites for the HBA to a subset of the binding capabilities
implemented by the HBA.
RETURN VALUES
The HBA_GetBindingCapability() and HBA_GetBindingSupport() functions return the following values:
HBA_STATUS_OK
Persistent binding capabilites have been returned.
HBA_STATUS_ERROR_ILLEGAL_WWN
Port WWN hbaPortWWN is not a WWN contained by the HBA referenced by handle.
HBA_STATUS_ERROR_NOT_SUPPORTED
The HBA handle specified by handle does not support persistent binding.
HBA_STATUS_ERROR
An error occurred. The value of pFlags remains unchanged and points to the persistent binding capabilites.
The HBA_SetBindingSupport() function returns:
HBA_STATUS_OK
Persistent binding capabilites have been enabled.
HBA_STATUS_ERROR_ILLEGAL_WWN
Port WWN hbaPortWWN is not a WWN contained by the HBA referenced by handle.
HBA_STATUS_ERROR_NOT_SUPPORTED
The HBA handle specified by handle does not support persistent binding.
HBA_STATUS_ERROR_INCAPABLE
The flags argument contains a capability not implemented by the 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 version 2) |
+-----------------------------+-----------------------------+
|MT-Level |Safe |
+-----------------------------+-----------------------------+
SEE ALSO
libhbaapi(3LIB), attributes(5)
T11 FC-MI Specification
SunOS 5.10 1 Sep 2003 HBA_GetBindingCapability(3HBAAPI)