Sponsored Content
Top Forums Shell Programming and Scripting calculating unique strings values Post 302598806 by Paulwintech on Wednesday 15th of February 2012 01:17:02 PM
Old 02-15-2012
Thank You!!! Hurray it works perfect..... Thank you so much

---------- Post updated at 11:47 PM ---------- Previous update was at 11:34 PM ----------

Hi,

i have another small request, need to remove double/triple space in between a content to single space in a file as below example.

File
bags 15 13
bags 15 14
blazer 24 24
blazer 33 32
boots 19 15

Result should be single space between the content
bags 15 13
bags 15 14
blazer 24 24
blazer 33 32
boots 19 15

Thanks
wintech

Last edited by Paulwintech; 02-15-2012 at 02:40 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to retrieve unique values

Hi all, I have a 10.txt file. In this file 2 words are present by name Active and Inactive and these words are repeated 7000 times. I want to take the unique 2 words from this 7000 lines. Thanks Mahalakshmi.A (3 Replies)
Discussion started by: mahalakshmi
3 Replies

2. Shell Programming and Scripting

Getting Unique values in a file

Hi, I have a file like this: Some_String_Here 123 123 123 321 321 321 3432 3221 557 886 321 321 I would like to find only the unique values in the files and get the following output: Some_String_Here 123 321 3432 3221 557 886 I am trying to get this done using awk. Can someone please... (5 Replies)
Discussion started by: Legend986
5 Replies

3. UNIX for Dummies Questions & Answers

Finding Unique strings which match pattern

I need to grep for a pattern in a file. Files are huge and have several repeated occurances of the strings which match pattern. I just need the strings which contain the pattern in the output. For eg. The contents of my file are as follows. The pattern I want to match by is ABCD ... (5 Replies)
Discussion started by: tektips
5 Replies

4. Shell Programming and Scripting

How to count unique strings

How do I count the total number of unique strings from a file using Perl? Any help is appreciated.. (6 Replies)
Discussion started by: my_Perl
6 Replies

5. UNIX for Dummies Questions & Answers

Calculating the Hours between two time values

Dear Folks, I want to calculate the elapsed hours between two time columns. I am using timestampdiff method for the same. I am able to get the value. But facing an issue of decimal values. For example the elapsed hours between 09:00:00 and 20:30:00 is coming as 11 instead of 11.5. I am using below... (1 Reply)
Discussion started by: dinesh1985
1 Replies

6. Shell Programming and Scripting

Calculating frequency of values within bins

Hi, I am working with files containing 2 columns in which i need to come up with the frequency/count of values in col. 2 falling within specifics binned values of col. 1. the contents of a sample file is shown below: 15 12.5 15 11.2 16 0.2 16 1.4 17 1.6 18 4.5 17 5.6 12 8.6 11 7.2 9 ... (13 Replies)
Discussion started by: ida1215
13 Replies

7. Shell Programming and Scripting

AWK, Perl or Shell? Unique strings and their maximum values from 3 column data file

I have a file containing data like so: 2012-01-02 GREEN 4 2012-01-02 GREEN 6 2012-01-02 GREEN 7 2012-01-02 BLUE 4 2012-01-02 BLUE 3 2012-01-02 GREEN 4 2012-01-02 RED 4 2012-01-02 RED 8 2012-01-02 GREEN 4 2012-01-02 YELLOW 5 2012-01-02 YELLOW 2 I can't always predict what the... (4 Replies)
Discussion started by: rich@ardz
4 Replies

8. Shell Programming and Scripting

Finding a text in files & replacing it with unique strings

Hallo Everyone. I have to admit I'm shell scripting illiterate . I need to find certain strings in several text files and replace each of the string by unique & corresponding text. I prepared a csv file with 3 columns: <filename>;<old_pattern>;<new_pattern> ... (5 Replies)
Discussion started by: gordom
5 Replies

9. Shell Programming and Scripting

Command to show unique strings in two files

how to display the unique strings in two files using shell script or commands. I tried diff and cmp but it shows the entire line, i need only the mismatched strings. File1: sat,sun,mon,tue rose,lilly,lotus white,red,blue,green,pink File2: sat,sun,mon,tue rose,sunflower,lotus... (4 Replies)
Discussion started by: Arun_Linux
4 Replies

10. UNIX for Beginners Questions & Answers

Code to get unique values

Hello All, I am trying to write a script which returns me clientID,programId,userID indicated in bold from the below log files.Log file is having many such data , iam just presenting sample . Sample Log file. hostname 1525867288264 UA:MP:EP491418 http-nio-8080-exec-11 ERROR Get Price... (13 Replies)
Discussion started by: nextStep
13 Replies
gnutls_certificate_set_x509_simple_pkcs12_mem(3)		      gnutls			  gnutls_certificate_set_x509_simple_pkcs12_mem(3)

NAME
gnutls_certificate_set_x509_simple_pkcs12_mem - API function SYNOPSIS
#include <gnutls/gnutls.h> int gnutls_certificate_set_x509_simple_pkcs12_mem(gnutls_certificate_credentials_t res, const gnutls_datum_t * p12blob, gnutls_x509_crt_fmt_t type, const char * password); ARGUMENTS
gnutls_certificate_credentials_t res is a gnutls_certificate_credentials_t structure. const gnutls_datum_t * p12blob the PKCS12 blob. gnutls_x509_crt_fmt_t type is PEM or DER of the pkcs12file . const char * password optional password used to decrypt PKCS12 file, bags and keys. DESCRIPTION
This function sets a certificate/private key pair and/or a CRL in the gnutls_certificate_credentials_t structure. This function may be called more than once (in case multiple keys/certificates exist for the server). Encrypted PKCS12 bags and PKCS8 private keys are supported. However, only password based security, and the same password for all opera- tions, are supported. PKCS12 file may contain many keys and/or certificates, and there is no way to identify which key/certificate pair you want. You should make sure the PKCS12 file only contain one key/certificate pair and/or one CRL. It is believed that the limitations of this function is acceptable for most usage, and that any more flexibility would introduce complexity that would make it harder to use this functionality at all. RETURNS
GNUTLS_E_SUCCESS (0) on success, or a negative error code. SINCE
2.8.0 REPORTING BUGS
Report bugs to <bug-gnutls@gnu.org>. General guidelines for reporting bugs: http://www.gnu.org/gethelp/ GnuTLS home page: http://www.gnu.org/software/gnutls/ COPYRIGHT
Copyright (C) 2012 Free Software Foundation, Inc.. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. SEE ALSO
The full documentation for gnutls is maintained as a Texinfo manual. If the info and gnutls programs are properly installed at your site, the command info gnutls should give you access to the complete manual. As an alternative you may obtain the manual from: http://www.gnu.org/software/gnutls/manual/ gnutls 3.1.15 gnutls_certificate_set_x509_simple_pkcs12_mem(3)
All times are GMT -4. The time now is 11:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy