05-08-2018
Thanks a lot. Excuse my ignorance but how many bytes do I allocate ?
My data is in UTF8 format and if I want to ensure that 5000 characters are chunked, what would be the byte size. In ASCII format it would be just 1 but in UTF8 I find that the byte size varies.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a large file(csv format) that I need to split into 2 files. The file looks something like
Original_file.txt
first name, family name, address
a, b, c,
d, e, f,
and so on for over 100,00 lines
I need to create two files from this one file. The condition is i need to ensure... (4 Replies)
Discussion started by: nbvcxzdz
4 Replies
2. HP-UX
Greetings all:
I am still new to Unix environment and I need help with the following requirement.
I have a large sequential file sorted on a field (say store#) that is being split into several smaller files, one for each store. That means if there are 500 stores, there will be 500 files. This... (1 Reply)
Discussion started by: SAIK
1 Replies
3. Shell Programming and Scripting
HI,
i've to split a large file which inputs seems like :
Input file name_file.txt
00001|AAAA|MAIL|DATEOFBIRTHT|.......
00001|AAAA|MAIL|DATEOFBIRTHT|.......
00002|BBBB|MAIL|DATEOFBIRTHT|.......
00002|BBBB|MAIL|DATEOFBIRTHT|.......
00003|CCCC|MAIL|DATEOFBIRTHT|.......... (1 Reply)
Discussion started by: AMARA
1 Replies
4. Shell Programming and Scripting
Hi,
I have file: data.log.1
### s1
main.build.3495
main.build.199
main.build.3408
###s2
main.build.3495
main.build.3408
main.build.199
I want to read this file and store in two arrays in Perl.
I have following command, which is working fine on command prompt.
perl -n -e... (1 Reply)
Discussion started by: ashvini
1 Replies
5. Shell Programming and Scripting
Hi guys,
i have a question about spliting a binary file into 2 chunks.
First chunk with all high bytes and the second one with all low bytes.
What unix tools can i use? And how can this be performed?
I looked in manpages of split and dd but this does not help.
Thanks (2 Replies)
Discussion started by: basta
2 Replies
6. Shell Programming and Scripting
I have a 3 GB text file that I would like to split. How can I do this?
It's a giant comma-separated list of numbers. I would like to make it into about 20 files of ~100 MB each, with a custom header and footer. The file can only be split on commas, but they're plentiful.
Something like... (3 Replies)
Discussion started by: CRGreathouse
3 Replies
7. Shell Programming and Scripting
I had a text file(comma seperated values) which contains as below
196237,ram,25-May-06,ram.kiran@xyz.com,204183,Pavan,4-Jun-07,Pavan.Desai@xyz.com,237107,ram Chandra,15-Mar-10,ram.krishna@xyz.com ... (3 Replies)
Discussion started by: giridhar276
3 Replies
8. Shell Programming and Scripting
Hi,
I need to split a large array "@sharedArray" into 10 small arrays.
The arrays should be like @sharedArray1,@sharedArray2,@sharedArray3...so on..
Can anyone help me with the logic to do so :(:confused: (6 Replies)
Discussion started by: rkrish
6 Replies
9. UNIX for Beginners Questions & Answers
Dears,
Need you help with the below file manipulation. I want to split the file into 8 smaller files but without cutting/disturbing the entries (meaning every small file should start with a entry and end with an empty line). It will be helpful if you can provide a one liner command for this... (12 Replies)
Discussion started by: Kamesh G
12 Replies
10. UNIX for Beginners Questions & Answers
Trying to split a 35gb file into 1000mb parts. My research shows I should you this. split -b 1000m file.txt and my return is "split: cannot open 'crunch1.txt' for reading: No such file or directory" so I tried split -b 1000m Documents/Wordlists/file.txt and I get nothing other than the curser just... (3 Replies)
Discussion started by: sub terra
3 Replies
LEARN ABOUT DEBIAN
asn1_string_print_ex_fp
ASN1_STRING_print_ex(3SSL) OpenSSL ASN1_STRING_print_ex(3SSL)
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(3SSL)