10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am looking for the way to add variable number of spaces between two string. e.g input line is
a ,bb
abc ,bcb
pqr ,bfg
My output should be something like this
a ,bb
abc ,bcb
pqr ,bfg
This text... (9 Replies)
Discussion started by: diehard
9 Replies
2. Shell Programming and Scripting
I'm using a shell script to get user input with this command:
read UserInput
I would then like to take the "UserInput" variable and strip out all of the following characters, regardless of where they appear in the variable or how many occurrences there are:
\/":|<>+=;,?*@
I'm not sure... (5 Replies)
Discussion started by: nrogers64
5 Replies
3. Shell Programming and Scripting
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
Discussion started by: todd.cutting
2 Replies
4. Shell Programming and Scripting
I have a variable that has an absolute path for a file on my computer. This dynamically changes. Is there a way I can assign two new variables from that one?
variable: /Users/keith/Desktop/test/file.mov
1) filename - no path or extention ....so just....file
2) path no filename or... (3 Replies)
Discussion started by: mainegate
3 Replies
5. Shell Programming and Scripting
hi,I am new to shell script,I have String,like this:
Number of rows exported: 5321
the numbe at end could changing,how can I extract this number and assign it to a variable,then use it later in script.
thanks. (19 Replies)
Discussion started by: vitesse
19 Replies
6. Shell Programming and Scripting
I want to check if a zip code is valid, using a variable that stores the zipcode. I am not sure how I would do this in a script. I know that simply checking for the numerical range of the number will not work, because '1' would be '00001' in zip code format. I know when I am in shell, I can use... (5 Replies)
Discussion started by: userix
5 Replies
7. Shell Programming and Scripting
Hi ,
i have to strip the spaces in the string which has the following value
ABC DEF
i want this to appear like this
ABC DEF
is there any spilt method?
please help....
Thanks (3 Replies)
Discussion started by: rag84dec
3 Replies
8. UNIX for Dummies Questions & Answers
Hi,
How to strip a portion of a file name from behind...Say for Eg..i have a file name like aaaaa.bbbbb.Mar-17-2007
i want to remove .Mar-17-2007...is there a one line command which can give this output...
Thanks
Kumar (5 Replies)
Discussion started by: kumarsaravana_s
5 Replies
9. UNIX for Dummies Questions & Answers
I am passing an argument to a file and i wanna check whether the argument is a number or string ?
how can i do this? (4 Replies)
Discussion started by: rolex.mp
4 Replies
10. Shell Programming and Scripting
I wish to compute the number of dot chars in a string.
Example:
VAR="aaaa.bbbbb.cccc"
I try the shortest command to solve this test.
Thanks in advance for your help.
Regards,
Giovanni (7 Replies)
Discussion started by: gio123bg
7 Replies
asn1_write_value(3) libtasn1 asn1_write_value(3)
NAME
asn1_write_value - API function
SYNOPSIS
#include <libtasn1.h>
asn1_retCode asn1_write_value(ASN1_TYPE node_root, const char * name, const void * ivalue, int len);
ARGUMENTS
ASN1_TYPE node_root
pointer to a structure
const char * name
the name of the element inside the structure that you want to set.
const void * ivalue
vector used to specify the value to set. If len is >0, VALUE must be a two's complement form integer. if len=0 *VALUE must be
a null terminated string with an integer value.
int len number of bytes of *value to use to set the value: value[0]..value[len-1] or 0 if value is a null terminated string
DESCRIPTION
Set the value of one element inside a structure.
If an element is OPTIONAL and you want to delete it, you must use the value=NULL and len=0. Using "pkix.asn":
result=asn1_write_value(cert, "tbsCertificate.issuerUniqueID", NULL, 0);
DESCRIPTION FOR EACH TYPE
INTEGER
VALUE must contain a two's complement form integer.
value[0]=0xFF , len=1 -> integer=-1. value[0]=0xFF value[1]=0xFF , len=2 -> integer=-1. value[0]=0x01 , len=1
-> integer= 1. value[0]=0x00 value[1]=0x01 , len=2 -> integer= 1. value="123" , len=0 -> integer= 123.
ENUMERATED
As INTEGER (but only with not negative numbers).
BOOLEAN
VALUE must be the null terminated string "TRUE" or "FALSE" and LEN != 0.
value="TRUE" , len=1 -> boolean=TRUE. value="FALSE" , len=1 -> boolean=FALSE.
OBJECT IDENTIFIER
VALUE must be a null terminated string with each number separated by a dot (e.g. "1.2.3.543.1"). LEN != 0.
value="1 2 840 10040 4 3" , len=1 -> OID=dsa-with-sha.
UTCTIME
VALUE must be a null terminated string in one of these formats: "YYMMDDhhmmssZ", "YYMMDDhhmmssZ", "YYMMDDhhmmss+hh'mm'", "YYMMDDhh-
mmss-hh'mm'", "YYMMDDhhmm+hh'mm'", or "YYMMDDhhmm-hh'mm'". LEN != 0.
value="9801011200Z" , len=1 -> time=Jannuary 1st, 1998 at 12h 00m Greenwich Mean Time
GENERALIZEDTIME
VALUE must be in one of this format: "YYYYMMDDhhmmss.sZ", "YYYYMMDDhhmmss.sZ", "YYYYMMDDhhmmss.s+hh'mm'", "YYYYMMDDhhmmss.s-hh'mm'",
"YYYYMMDDhhmm+hh'mm'", or "YYYYMMDDhhmm-hh'mm'" where ss.s indicates the seconds with any precision like "10.1" or "01.02". LEN != 0
value="2001010112001.12-0700" , len=1 -> time=Jannuary 1st, 2001 at 12h 00m 01.12s Pacific Daylight Time
OCTET STRING
VALUE contains the octet string and LEN is the number of octets.
value="$ssh$x01$ssh$x02$ssh$x03" , len=3 -> three bytes octet string
l l l
GENERALSTRING
VALUE coctains tce generclstring and LEN is the number of octets.
k k k
value="$ssh$x01$ssh$x02$ssh$x03" , len=3 -> three bytes generalstring
l l l
BIT STRING
VALUE coctains the bit string organized by bytes and LEN is the number of bits.
k
value="$ssh$xCF" , len=6 -> bit string="110011" (six bits)
l
CHOICE
if NAME indicates a choice type, VALUE must specify one of the alternatives with a null terminated string. LEN != 0. Using "pkix.asn"
result=asn1_write_value(cert, "certificate1.tbsCertificate.subject", "rdnSequence", 1);
ANY
VALUE indicates the der encoding of a structure. LEN != 0.
SEQUENCE OF
VALUE must be the null terminated string "NEW" and LEN != 0. With this instruction another element is appended in the sequence. The name of
this element will be "?1" if it's the first one, "?2" for the second and so on.
Using "pkix.asn"
result=asn1_write_value(cert, "certificate1.tbsCertificate.subject.rdnSequence", "NEW", 1);
SET OF
the same as SEQUENCE OF. Using "pkix.asn":
result=asn1_write_value(cert, "tbsCertificate.subject.rdnSequence.?LAST", "NEW", 1);
RETURNS
ASN1_SUCCESS if the value was set, ASN1_ELEMENT_NOT_FOUND if name is not a valid element, and ASN1_VALUE_NOT_VALID if ivalue has a wrong
format.
COPYRIGHT
Copyright (C) 2006-2011 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 libtasn1 is maintained as a Texinfo manual. If the info and libtasn1 programs are properly installed at your
site, the command
info libtasn1
should give you access to the complete manual.
libtasn1 2.13 asn1_write_value(3)