Sponsored Content
Full Discussion: File operator command
Top Forums Shell Programming and Scripting File operator command Post 302946680 by arun888 on Thursday 11th of June 2015 09:17:37 AM
Old 06-11-2015
thanks a lot.

It checks whether the length of the string s1 is non-zero or not.
 

10 More Discussions You Might Find Interesting

1. Programming

new operator

Hi, Please clear the 2 questions, 2 Questions, 1) Why the new as a operator? Is there any special reason why it can't be a function like malloc? 2) How are we considering sizeof(),new are as a opearartors? I know + - * / -> , . etc.. are operators, which criteria satisfied by sizeof()... (4 Replies)
Discussion started by: Nagapandi
4 Replies

2. UNIX for Dummies Questions & Answers

File already exists error while using '>' operator

hi i am using the below code grep -v '^$' file1.lst >file1.lst but it gives file1.lst already exists. And i want to over rite on the same file Whats the work around? (5 Replies)
Discussion started by: jathin12
5 Replies

3. Shell Programming and Scripting

Checking if file exists using a NOT operator and shell variable

Hi, I'm new to UNIX, at least shell programming and am having trouble figuring out a problem i'm having. In one section in my nested if statement, i want the program to test if the file does not exist, based on an argument supplied at the command line by the user. What i have is elif ; then... (3 Replies)
Discussion started by: rowlf
3 Replies

4. Shell Programming and Scripting

FIle (directory) test operator (bash)

I'm almost pulling out my hair trying to figure out what's wrong with this... there's no reason I can see that it shouldn't be working. It seems that the code acts as though the conditional statement is true no matter what - I've even tried removing the negation operator, but it always goes into... (5 Replies)
Discussion started by: wildbluefaerie
5 Replies

5. Shell Programming and Scripting

How can I use a pipe operator in a variable: OPTION="| command"?

I have a string of commands I am piping some data through and I want to allow command line switches to select which commands are used. I want to do something like this: OPTION="| command3" command1 -a -b c.txt | command2 -d -e $OPTION >result.txt I want to do it that way because OPTION may be... (1 Reply)
Discussion started by: KenJackson
1 Replies

6. UNIX for Dummies Questions & Answers

su with << operator

All, THe below is my script , when i use this i am getting nothing . could any one help me to know what is the use of the << operator below su - $8 << supo echo "exportsph $2 $1 $3 $4" exportsph $2 $1 $3 $4 supo i also tried as individual command su - userid << supo , when i do... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

7. UNIX for Dummies Questions & Answers

+= operator

im new to bash scripting and im just using online tutorials and trial and error. i wanted to write a script to read numbers from a file and find their sum: #!/bin/bash theSum=0 for line in $(cat numbers.txt) do let "theSum = theSum + $line" echo "$line" done echo "The sum is... (3 Replies)
Discussion started by: astrolux444
3 Replies

8. Shell Programming and Scripting

Problem in test file operator on a ufsdump archive file mount nfs

Hi, I would like to ask if someone know how to test a files if exist the file is a nfs mount ufsdump archive file.. i used the test operator -f -a h almost all test operator but i failed file1=ufs_root_image.dump || echo "files doesn't exist && exit 1 the false file1 is working but... (0 Replies)
Discussion started by: jao_madn
0 Replies

9. Shell Programming and Scripting

perl's substitution operator "s" with file contents?

Please show me how to make substitution over the contents of a file in a perl script. In a perl script, the core part of substitution operation is s/FINDPATTERN/REPLACEPATTERN/g; However, I cannot figure out how to make the substitution occur over the contents of a file. The following... (3 Replies)
Discussion started by: LessNux
3 Replies

10. Shell Programming and Scripting

How to use pipe operator as simple character in text file?

Hello all, I have two files which are cmd and disk. `$cat cmd lsdev | grep -iw` `$cat disk hdisk2` Now I want to use the contents of both the files in a way such that `lsdev | grep -iw` command works for hdisk2 when I write the following script: `!#/bin/sh cmd1="$( sed -n... (4 Replies)
Discussion started by: ravi.trivedi
4 Replies
X509_NAME_add_entry_by_txt(3)					      OpenSSL					     X509_NAME_add_entry_by_txt(3)

NAME
X509_NAME_add_entry_by_txt, X509_NAME_add_entry_by_OBJ, X509_NAME_add_entry_by_NID, X509_NAME_add_entry, X509_NAME_delete_entry - X509_NAME modification functions SYNOPSIS
int X509_NAME_add_entry_by_txt(X509_NAME *name, char *field, int type, unsigned char *bytes, int len, int loc, int set); int X509_NAME_add_entry_by_OBJ(X509_NAME *name, ASN1_OBJECT *obj, int type, unsigned char *bytes, int len, int loc, int set); int X509_NAME_add_entry_by_NID(X509_NAME *name, int nid, int type, unsigned char *bytes, int len, int loc, int set); int X509_NAME_add_entry(X509_NAME *name,X509_NAME_ENTRY *ne, int loc, int set); X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc); DESCRIPTION
X509_NAME_add_entry_by_txt(), X509_NAME_add_entry_by_OBJ() and X509_NAME_add_entry_by_NID() add a field whose name is defined by a string field, an object obj or a NID nid respectively. The field value to be added is in bytes of length len. If len is -1 then the field length is calculated internally using strlen(bytes). The type of field is determined by type which can either be a definition of the type of bytes (such as MBSTRING_ASC) or a standard ASN1 type (such as V_ASN1_IA5STRING). The new entry is added to a position determined by loc and set. X509_NAME_add_entry() adds a copy of X509_NAME_ENTRY structure ne to name. The new entry is added to a position determined by loc and set. Since a copy of ne is added ne must be freed up after the call. X509_NAME_delete_entry() deletes an entry from name at position loc. The deleted entry is returned and must be freed up. NOTES
The use of string types such as MBSTRING_ASC or MBSTRING_UTF8 is strongly recommened for the type parameter. This allows the internal code to correctly determine the type of the field and to apply length checks according to the relevant standards. This is done using ASN1_STRING_set_by_NID(). If instead an ASN1 type is used no checks are performed and the supplied data in bytes is used directly. In X509_NAME_add_entry_by_txt() the field string represents the field name using OBJ_txt2obj(field, 0). The loc and set parameters determine where a new entry should be added. For almost all applications loc can be set to -1 and set to 0. This adds a new entry to the end of name as a single valued RelativeDistinguishedName (RDN). loc actually determines the index where the new entry is inserted: if it is -1 it is appended. set determines how the new type is added. If it is zero a new RDN is created. If set is -1 or 1 it is added to the previous or next RDN structure respectively. This will then be a multivalued RDN: since multivalues RDNs are very seldom used set is almost always set to zero. EXAMPLES
Create an X509_NAME structure: "C=UK, O=Disorganized Organization, CN=Joe Bloggs" X509_NAME *nm; nm = X509_NAME_new(); if (nm == NULL) /* Some error */ if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC, "C", "UK", -1, -1, 0)) /* Error */ if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC, "O", "Disorganized Organization", -1, -1, 0)) /* Error */ if (!X509_NAME_add_entry_by_txt(nm, MBSTRING_ASC, "CN", "Joe Bloggs", -1, -1, 0)) /* Error */ RETURN VALUES
X509_NAME_add_entry_by_txt(), X509_NAME_add_entry_by_OBJ(), X509_NAME_add_entry_by_NID() and X509_NAME_add_entry() return 1 for success of 0 if an error occurred. X509_NAME_delete_entry() returns either the deleted X509_NAME_ENTRY structure of NULL if an error occurred. BUGS
type can still be set to V_ASN1_APP_CHOOSE to use a different algorithm to determine field types. Since this form does not understand mul- ticharacter types, performs no length checks and can result in invalid field types its use is strongly discouraged. SEE ALSO
ERR_get_error(3), d2i_X509_NAME(3) HISTORY
0.9.7a 2002-11-12 X509_NAME_add_entry_by_txt(3)
All times are GMT -4. The time now is 03:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy