Sponsored Content
Full Discussion: how to extract the data ?
Top Forums Shell Programming and Scripting how to extract the data ? Post 302325955 by Franklin52 on Tuesday 16th of June 2009 03:00:48 PM
Old 06-16-2009
Try this:

Code:
awk -F" - " '{gsub("[(\.]","")}{print $2}'

You can place "weird" characters within the brackets [], special characters must be escaped with a backslash.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Extract data correction???

Hi I have file "test.txt" i need to extract the data as below from this file. /home/cvs/gkc ->awk -v RS= '{print $(NF-2),$(NF-1),$NF}' test.txt Buildfile: build.xml Buildfile: build.xml Created dir: /dist/advance/2.0.4/20060926-0413 awk: The field -1 must be in the range 0 to 199. ... (6 Replies)
Discussion started by: gkrishnag
6 Replies

2. Shell Programming and Scripting

extract data from file

I m new to shell scripting & i need a help.... i have file like.... Name := sachin address:=something phone:=111 ... Note: There might be or not space between Name & := and between := & sachin. I need to extract the data from each line of file as var1=Name value1=sachin same for... (13 Replies)
Discussion started by: ps_sach
13 Replies

3. Shell Programming and Scripting

extract data from a data matrix with filter criteria

Here is what old matrix look like, IDs X1 X2 Y1 Y2 10914061 -0.364613333 -0.362922333 0.001691 -0.450094667 10855062 0.845956333 0.860396667 0.014440333 1.483899333... (7 Replies)
Discussion started by: ssshen
7 Replies

4. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

5. Shell Programming and Scripting

Extract specific data content from a long list of data

My input: Data name: ABC001 Data length: 1000 Detail info Data Direction Start_time End_time Length 1 forward 10 100 90 1 forward 15 200 185 2 reverse 50 500 450 Data name: XFG110 Data length: 100 Detail info Data Direction Start_time End_time Length 1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies

6. Shell Programming and Scripting

XML data extract

Hi all, I have the following xml document : <HEADER><El1>asdf</El1> <El2>3</El2> <El3>asad</El3> <El4>asasdf</El4> <El5>asdf</El5> <El6>asdf</El6> <El7>asdf</El7> <El8>A</El8> <El9>0</El9> <El10>75291028141917</El10> <El11>asdf</El11> <El12>sdf</El12> <El13>er</El13> <El14><El15>asdf... (1 Reply)
Discussion started by: nthed
1 Replies

7. UNIX for Dummies Questions & Answers

extract lines from data

I have a file that looks like this: >cel-miR-35 MIMAT6 C eles le UCACCGGGUGGAAACUAGCAGU >hsa-let-7a MI062 H sa UGAGGUAGUAGGUUGUAUAGUU >cel-miR-36 M007 Ca ele UCACCGGGUGAAAAUUCGCAUG >hsa-let-7b MI63 Hmo sns le UGAGGUAGUAGGUUGUGUGGUUI would like to extract all the lines that start with... (7 Replies)
Discussion started by: jdhahbi
7 Replies

8. Shell Programming and Scripting

help with data extract script

hi, i'am trying to write a script which takes a data element from one file and searches in a certain file path and after it finds it it redirects the file names to a new file...Now i have to pick the up the last modified file's Timestamp(MMDDYY) from the files collected for each data element. ... (2 Replies)
Discussion started by: kmr023
2 Replies

9. Shell Programming and Scripting

Help with File Data Extract

Hello, Hope you are doing fine. I have been struggling with it for some time now and I would really appreciate your help. Following is file format: Currency,Name,Date, Term USD, ABC, 2011/11/11, T0, S1, S2, S3, S4 , , ,T1, 5.6, 2.3, 6.5, 4.5 , ... (5 Replies)
Discussion started by: srattani
5 Replies

10. Shell Programming and Scripting

Extract header data from one file and combine it with data from another file

Hi, Great minds, I have some files, in fact header files, of CTD profiler, I tried a lot C programming, could not get output as I was expected, because my programming skills are very poor, finally, joined unix forum with the hope that, I may get what I want, from you people, Here I have attached... (17 Replies)
Discussion started by: nex_asp
17 Replies
ASN1_STRING_print_ex(3) 					      OpenSSL						   ASN1_STRING_print_ex(3)

NAME
ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp - ASN1_STRING output routines. SYNOPSIS
#include <openssl/asn1.h> int ASN1_STRING_print_ex(BIO *out, ASN1_STRING *str, unsigned long flags); int ASN1_STRING_print_ex_fp(FILE *fp, ASN1_STRING *str, unsigned long flags); int ASN1_STRING_print(BIO *out, ASN1_STRING *str); DESCRIPTION
These functions output an ASN1_STRING structure. ASN1_STRING is used to represent all the ASN1 string types. ASN1_STRING_print_ex() outputs str to out, the format is determined by the options flags. ASN1_STRING_print_ex_fp() is identical except it outputs to fp instead. ASN1_STRING_print() prints str to out but using a different format to ASN1_STRING_print_ex(). It replaces unprintable characters (other than CR, LF) with '.'. NOTES
ASN1_STRING_print() is a legacy function which should be avoided in new applications. Although there are a large number of options frequently ASN1_STRFLGS_RFC2253 is suitable, or on UTF8 terminals ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB. The complete set of supported options for flags is listed below. Various characters can be escaped. If ASN1_STRFLGS_ESC_2253 is set the characters determined by RFC2253 are escaped. If ASN1_STRFLGS_ESC_CTRL is set control characters are escaped. If ASN1_STRFLGS_ESC_MSB is set characters with the MSB set are escaped: this option should not be used if the terminal correctly interprets UTF8 sequences. Escaping takes several forms. If the character being escaped is a 16 bit character then the form "UXXXX" is used using exactly four characters for the hex representation. If it is 32 bits then "WXXXXXXXX" is used using eight characters of its hex representation. These forms will only be used if UTF8 conversion is not set (see below). Printable characters are normally escaped using the backslash '' character. If ASN1_STRFLGS_ESC_QUOTE is set then the whole string is instead surrounded by double quote characters: this is arguably more readable than the backslash notation. Other characters use the "XX" using exactly two characters of the hex representation. If ASN1_STRFLGS_UTF8_CONVERT is set then characters are converted to UTF8 format first. If the terminal supports the display of UTF8 sequences then this option will correctly display multi byte characters. If ASN1_STRFLGS_IGNORE_TYPE is set then the string type is not interpreted at all: everything is assumed to be one byte per character. This is primarily for debugging purposes and can result in confusing output in multi character strings. If ASN1_STRFLGS_SHOW_TYPE is set then the string type itself is printed out before its value (for example "BMPSTRING"), this actually uses ASN1_tag2str(). The content of a string instead of being interpreted can be "dumped": this just outputs the value of the string using the form #XXXX using hex format for each octet. If ASN1_STRFLGS_DUMP_ALL is set then any type is dumped. Normally non character string types (such as OCTET STRING) are assumed to be one byte per character, if ASN1_STRFLGS_DUMP_UNKNOWN is set then they will be dumped instead. When a type is dumped normally just the content octets are printed, if ASN1_STRFLGS_DUMP_DER is set then the complete encoding is dumped instead (including tag and length octets). ASN1_STRFLGS_RFC2253 includes all the flags required by RFC2253. It is equivalent to: ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER SEE ALSO
X509_NAME_print_ex(3), ASN1_tag2str(3) HISTORY
TBA 1.0.1e 2013-02-11 ASN1_STRING_print_ex(3)
All times are GMT -4. The time now is 10:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy