08-04-2012
Thanks burtas11. That serves the purpose.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have input with decimal point ( 9.99 ) for hours variable hrs.
I need to change it to seconds.
Here is my code:
secs=`/usr/ucb/echo $hrs*3600 |bc`
But I don't want to see the decimal point.
I can use awk to trim it if there is one.
I am just wondering if there is better standard... (2 Replies)
Discussion started by: cin2000
2 Replies
2. Shell Programming and Scripting
Hi all. Using /bin/sh on an HPUX system.
I want to place a decimal in the field 2 charactors from the right (yes, converting to currency). The field lengths are variable. Here's what I'm doing:
exec < filename
while read FIELD1 FIELD2
do
FIELD1="echo $FIELD1 | sed 'syntax that will... (4 Replies)
Discussion started by: lyoncc
4 Replies
3. Shell Programming and Scripting
How to compare two numbers with decimal points ?
Is there a way in bash to do this? (33 Replies)
Discussion started by: kinny
33 Replies
4. Shell Programming and Scripting
Hi
In Unix, I have a file with some numbers like :
45600
12345
I want to insert a decimal point for these numbers based on user input.
If the input is 2, the numbers should be changed to
456.00
123.45
If the input is 3, the numbers should be changed to
45.600
12.345
Can... (2 Replies)
Discussion started by: yoursdivu
2 Replies
5. Shell Programming and Scripting
Have columns with digits and strings like:
input.txt
3840 3841 3842 Dav Thun Tax
Cahn 146; Dav.
3855 3853 3861 3862 Dav Thun Tax
2780 Karl VI.,
3873 3872 3872 Dav Thun Tax
3894 3893 3897 3899 Dav Thun Tax
403; Thun 282.
3958 3959 3960 Dav Thun Tax
3972 3972 3972 3975 Dav Thun Tax... (8 Replies)
Discussion started by: sdf
8 Replies
6. Shell Programming and Scripting
Hi everyone,
I am new here and generally not experienced with linux. My question must be easy, but as for now I have no idea how to do it.
I have lots of directories with numerical names, e.g. 50 50.1 50.12 etc. What I want is to leave directories with no or single digit after the decimal... (2 Replies)
Discussion started by: cabaciucia
2 Replies
7. UNIX for Beginners Questions & Answers
hi there I being trying to figure out way to add " .0" to an integer value in a csv using sed or awk with out success. just as a work around for 2147483647 32 bit limitation that influxdb is currently having
the data base will accept values and work fine if it has the XXX.0 ... (7 Replies)
Discussion started by: sash99
7 Replies
8. Shell Programming and Scripting
Hello,
I have often found bash to be difficult when it comes to floating point numbers. I have data with rows of tab delimited floating point numbers. I need to find the smallest number in each row that is not 0.0. Numbers can be negative and they do not come in any particular order for a given... (9 Replies)
Discussion started by: LMHmedchem
9 Replies
9. UNIX for Advanced & Expert Users
Hi , I have a file which contains text like
A|Mau|Code|12|Detail
B|Mau|Code|20|Header
I want to write a command using awk which will output
A|Mau|Code|12.00|Detail
B|Mau|Code|20.00|Header
I used a command like awk -F"|" {printf "%s|%s|%s|%.2f|%s",$1,$2,$3,$4,$5}' which does the... (4 Replies)
Discussion started by: LoneRanger
4 Replies
LEARN ABOUT PHP
openssl_x509_checkpurpose
OPENSSL_X509_CHECKPURPOSE(3) 1 OPENSSL_X509_CHECKPURPOSE(3)
openssl_x509_checkpurpose - Verifies if a certificate can be used for a particular purpose
SYNOPSIS
int openssl_x509_checkpurpose (mixed $x509cert, int $purpose, [array $cainfo = array()], [string $untrustedfile])
DESCRIPTION
openssl_x509_checkpurpose(3) examines a certificate to see if it can be used for the specified $purpose.
PARAMETERS
o $x509cert
- The examined certificate.
o $purpose
-
openssl_x509_checkpurpose(3) purposes
+---------------------------+---------------------------------------------------+
| Constant | |
| | |
| | Description |
| | |
+---------------------------+---------------------------------------------------+
| X509_PURPOSE_SSL_CLIENT | |
| | |
| | Can the certificate be used for the client side |
| | of an SSL connection? |
| | |
| X509_PURPOSE_SSL_SERVER | |
| | |
| | Can the certificate be used for the server side |
| | of an SSL connection? |
| | |
|X509_PURPOSE_NS_SSL_SERVER | |
| | |
| | Can the cert be used for Netscape SSL server? |
| | |
| X509_PURPOSE_SMIME_SIGN | |
| | |
| | Can the cert be used to sign S/MIME email? |
| | |
|X509_PURPOSE_SMIME_ENCRYPT | |
| | |
| | Can the cert be used to encrypt S/MIME email? |
| | |
| X509_PURPOSE_CRL_SIGN | |
| | |
| | Can the cert be used to sign a certificate revo- |
| | cation list (CRL)? |
| | |
| X509_PURPOSE_ANY | |
| | |
| | Can the cert be used for Any/All purposes? |
| | |
+---------------------------+---------------------------------------------------+
These options are not bitfields - you may specify one only!
o $cainfo
-$cainfo should be an array of trusted CA files/dirs as described in Certificate Verification.
o $untrustedfile
- If specified, this should be the name of a PEM encoded file holding certificates that can be used to help verify the certifi-
cate, although no trust is placed in the certificates that come from that file.
RETURN VALUES
Returns TRUE if the certificate can be used for the intended purpose, FALSE if it cannot, or -1 on error.
PHP Documentation Group OPENSSL_X509_CHECKPURPOSE(3)