Hi,
I have a script that fetches only specific information from fcinfo command. Below is a portion of the script.
#!/usr/bin/ksh
set -x
HBA_COUNT=`sudo fcinfo hba-port | grep -i state | awk 'END{print NR}'`
echo "$HBA_COUNT HBAs exist"
echo '........'
INDEX=1
while $INDEX -le... (2 Replies)
hi guys, i would like to print two lines from a file as two adjacent columns using excel using awk.. i have this so far:
awk '{for(i=1; i<=NF; i++) {printf("%s\n",$i)}}' "$count".ttt > "$count".csv #this to print the first line from the .ttt file as rows of the first column in the .csv... (9 Replies)
Hello,
I want to print a number of lines of a file after a specific expression of a line.
I have this sed command but it prints only 1 line after the expression.
How could I adapt it to print for instance 10 lines after or 15 lines after ?
sed -n '/regexp/{n;p;}'
Thx & Regs,
Rany. (5 Replies)
Hello all,
I need to print all the lines before a specific string and print a custom message 2 lines after that.
So far I have managed to print everything up the string, inclusively, but I can't figure out how to print the 2 lines after that and the custom message.
My code thus far is:... (4 Replies)
Hi All,
I'm looking to use AWK to pattern match lines in XML file - Example patten for below sample would be /^<apple>/
The sample I wrote out is very basic compared to what I am actually working with but it will get me started
I would like to keep the matched line(s) unchanged but have them... (4 Replies)
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)
Hi
I have a file like
# vi require.txt
1,BANK,Read blocks that cycle.
yellow
Read blocks.
2,ACCOUNT,Finished
Red
Finished .
3,LOAN, pipe
white
pipe
4,PROFIT,Resolve.
black
Resolve
Am using like
cat require.txt | grep -w ACCOUNTThe output I get is (8 Replies)
Hi
I have a file which is tab-delimited. Now, I'd like to print the lines which have "chr6" string in both first and second columns. Could anybody help? (3 Replies)
This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port.
fc2/12 is up
Port description is SEIEDISCOVER-3
Speed is 4 Gbps
fc2/13 is down (Administratively down)
fc2/14 is up
Port... (1 Reply)
I have some test data that is seperated out into annual records, each record has a start date (COL7), an end date (COL8) and a maturity date (COL18) - What I need to do is ensure that there is one record to cover each year right up until Maturity date (COL18).
In the first group of the below... (10 Replies)
Discussion started by: Ads89
10 Replies
LEARN ABOUT FREEBSD
pthread_mutexattr_getprioceiling
PTHREAD_MUTEXATTR(3) BSD Library Functions Manual PTHREAD_MUTEXATTR(3)NAME
pthread_mutexattr_init, pthread_mutexattr_destroy, pthread_mutexattr_setprioceiling, pthread_mutexattr_getprioceiling,
pthread_mutexattr_setprotocol, pthread_mutexattr_getprotocol, pthread_mutexattr_settype, pthread_mutexattr_gettype -- mutex attribute opera-
tions
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h>
int
pthread_mutexattr_init(pthread_mutexattr_t *attr);
int
pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
int
pthread_mutexattr_setprioceiling(pthread_mutexattr_t *attr, int prioceiling);
int
pthread_mutexattr_getprioceiling(pthread_mutexattr_t *attr, int *prioceiling);
int
pthread_mutexattr_setprotocol(pthread_mutexattr_t *attr, int protocol);
int
pthread_mutexattr_getprotocol(pthread_mutexattr_t *attr, int *protocol);
int
pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
int
pthread_mutexattr_gettype(pthread_mutexattr_t *attr, int *type);
DESCRIPTION
Mutex attributes are used to specify parameters to pthread_mutex_init(). One attribute object can be used in multiple calls to
pthread_mutex_init(), with or without modifications between calls.
The pthread_mutexattr_init() function initializes attr with all the default mutex attributes.
The pthread_mutexattr_destroy() function destroys attr.
The pthread_mutexattr_set*() functions set the attribute that corresponds to each function name.
The pthread_mutexattr_get*() functions copy the value of the attribute that corresponds to each function name to the location pointed to by
the second function parameter.
RETURN VALUES
If successful, these functions return 0. Otherwise, an error number is returned to indicate the error.
ERRORS
The pthread_mutexattr_init() function will fail if:
[ENOMEM] Out of memory.
The pthread_mutexattr_destroy() function will fail if:
[EINVAL] Invalid value for attr.
The pthread_mutexattr_setprioceiling() function will fail if:
[EINVAL] Invalid value for attr, or invalid value for prioceiling.
The pthread_mutexattr_getprioceiling() function will fail if:
[EINVAL] Invalid value for attr.
The pthread_mutexattr_setprotocol() function will fail if:
[EINVAL] Invalid value for attr, or invalid value for protocol.
The pthread_mutexattr_getprotocol() function will fail if:
[EINVAL] Invalid value for attr.
The pthread_mutexattr_settype() function will fail if:
[EINVAL] Invalid value for attr, or invalid value for type.
The pthread_mutexattr_gettype() function will fail if:
[EINVAL] Invalid value for attr.
SEE ALSO pthread_mutex_init(3)STANDARDS
The pthread_mutexattr_init() and pthread_mutexattr_destroy() functions conform to ISO/IEC 9945-1:1996 (``POSIX.1'')
The pthread_mutexattr_setprioceiling(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_setprotocol(), pthread_mutexattr_getprotocol(),
pthread_mutexattr_settype(), and pthread_mutexattr_gettype() functions conform to Version 2 of the Single UNIX Specification (``SUSv2'')
BSD May 1, 2000 BSD