Hi, I have the following file:
As a delimiter I use ":". I want to have distinct rows based only on the last column, but also to keep the rest of the fields in front. The sorting is doesn't metter, e.g. just need one line with "Invalid parameter" and one line with "Invalid number". So desired output is:
Thanks in advance!
Hi, buddies out there.
I have a text file ( only one column ) which I created using vi editor. The file contains duplicate rows and I would like to select distinct rows, how to go on it using unix command:
file content =
apple
apple
orange
watermelon
apple
orange
Can it be done... (7 Replies)
How do I create a script that provides a count of distinct values of a particular field in a file utilizing commonly available UNIX commands (sh or awk)?
Field1|Field2|Field3|Field4
AAA|BBB|CCC|DDD
111|222|333|777
AAA|EEE|ZZZ|EEE
111|555|333|444
AAA|EEE|CCC|DDD
111|222|555|444
For... (2 Replies)
Hi ,
I have a similar problem.
Please can anyone help me with a shell script or a perl.
I have a flat file like this
fruit country
apple germany
apple india
banana pakistan
banana saudi
mango india
I want to get a output like
fruit country
apple ... (7 Replies)
If i have a file sample.txt with more than 10 columns and 11th column as following data. would it be possible to get the distinct counts of values in single shot,Thank you.
Y
Y
N
N
N
P
P
o
Expected Result:
Value count
Y 2
N 3
P 2 (2 Replies)
Hi All,
I've got a text file which is Postcode,Postcode, Travel_time and I want to select all of the rows where the 3rd column value is over 255. Can someone show me the magic on how to do this?
Originally it did contain 4 columns but i've managed to strip out the first 3 using:
cat textfile |... (3 Replies)
I have 2 files,
file01= 7 columns, row unknown (but few)
file02= 7 columns, row unknown (but many)
now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there
e.g.
file 01
James|0|50|25|10|50|30... (1 Reply)
Hi ,
i need to display only one of duplicated values and merged them in one record only when tag started with 3100.2.128.8
3100.2.97.1=192.168.0.12
3100.2.128.8=418/66/03e9/0044801
3100.2.128.8=418/66/03ea/0044601
3100.2.128.8=418/66/03e9/0044801
3100.2.128.8=418/66/03ea/0044601... (5 Replies)
Hi Folks,
I have the below feed file named abc1.txt in which you can see there is a title and below is the respective values in the rows and it is completely pipe delimited file ,.
... (3 Replies)
Hi
How can I extract sequences from a fasta file with respect a certain criteria? The beginning of my file (containing in total more than 1000 sequences) looks like this:
>H8V34IS02I59VP
SDACNDLTIALLQIAREVRVCNPTFSFRWHPQVKDEVMRECFDCIRQGLG
YPSMRNDPILIANCMNWHGHPLEEARQWVHQACMSPCPSTKHGFQPFRMA... (6 Replies)
Discussion started by: Marion MPI
6 Replies
LEARN ABOUT FREEBSD
pthread_mutexattr_gettype
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