10-19-2009
Indeed, I missed the question was about doing it from C.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
With cut -c 8-13 myfile,
I am getting some numeric value.
In my shell script I am trying to assign something like this,
var=cut -c 8-13 myfile
But at the time of execution I am getting -c is not found.
If I dont assign, then script executes well.
Can we not simply use the value from one... (8 Replies)
Discussion started by: videsh77
8 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to assign the output of a command to a variable and then concat it with another string, however, it keeps overwriting the original string instead of adding on to the end of the string.
Contents of test.txt --> This is a test
var1="`head -n 1 test.txt`"
echo $var1 (This is a... (5 Replies)
Discussion started by: oma04
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I wrote a script to get the oldest file from a directory path (which is passed as a parameter to the script)
#########################################################
XMLFILE_PATH={$1}
cd $XMLFILE_PATH
JPM_FILENAME = `(ls -tr User* | head -1)`
#echo $JPM_FILENAME
###### END... (1 Reply)
Discussion started by: dsrookie
1 Replies
4. Shell Programming and Scripting
Hi,
i have two questions, I am new to programming
1. I have an output of a command and i want to get some specific part of it in a variable. i am trying
sr=`some comand xyz| grep 'Last Changed Rev:' | cut -c19-`
now variable sr gets a end of line character at end.
output of the command... (3 Replies)
Discussion started by: muaz
3 Replies
5. Shell Programming and Scripting
When I run time -p <command>, it outputs:
real X.XX
user X.XX
sys X.XXwhere X.XX is seconds. How I can take just that first number output, the seconds of real time, and assign that to a variable? (9 Replies)
Discussion started by: jeriryan87
9 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a shell script containing a command string in the following format:
command1 | command2 | cut -c9-16
The output from this is a record number (using characters 9-16 of the original output string) e.g. ORD-1234
I wish to save this value to a variable for use in later commands... (4 Replies)
Discussion started by: philjo
4 Replies
7. Shell Programming and Scripting
I'm hoping you guys can help me out here. I've been trying different methods to try and get what IW as hoping would be a fairly simple script but has turned into a pain.
Bit of background - I am writing a script to check values in certain failes to ensure they are corerct. I'm runnign this on... (2 Replies)
Discussion started by: stuc
2 Replies
8. UNIX for Advanced & Expert Users
I'm working on a short BASH script on my Ubuntu box that will run powerpoint scripts with MS Powerpoint Viewer 2007 via WINE.
I can run the presentation when I run it manually but what i'd like to do is have the script look for the newest file then run it.
#! /bin/sh
# Start the newest... (2 Replies)
Discussion started by: binary-ninja
2 Replies
9. Shell Programming and Scripting
Hi,
I'd like to assign the output of the find command to a variable.
What I need is to run the find command, and if it returns zero files, the program exits.
so i'm trying to assign the output of the find command to the $var1 variable....and then if this is less than one, I echo a... (2 Replies)
Discussion started by: horhif
2 Replies
10. Shell Programming and Scripting
I am trying to run a query which returns a sum value(a number).
I want to get it in a variable so that i can refer to that variable in different places.
when i am running the following command
variable=`isql -Uuser -Sserver -Ppassword
1> select sum(count(*)) from xyz..abc where clm_id... (2 Replies)
Discussion started by: Sharma331
2 Replies
LEARN ABOUT DEBIAN
yhsm-validation-server
yhsm-validation-server(1) General Commands Manual yhsm-validation-server(1)
NAME
yhsm-validation-server - Credential validation server utilizing YubiHSM
SYNOPSIS
yhsm-validation-server [mode]
DESCRIPTION
This is a validation server using the YubiHSM for cryptographic operations.
It is primarily built to validate YubiKey OTPs (not stored in the YubiHSM internal database), but it can also validate OATH token codes and
legacy passwords.
OPTIONS
-D, --device
device file name (default: /dev/ttyACM0)
-v, --verbose
enable verbose operation
--debug
enable debug printout, including all data sent to/from YubiHSM
--U, --serve-url base
base of URL for validation web service (default: /yhsm/validate?)
--port num
port to listen on (default: 8003)
--addr addr
address to bind to (default: 127.0.0.1)
--hmac-kh kh
key handle to use for HMAC-SHA-1. Examples : "1", "0xabcd".
--hotp-window num
number of OATH counter values to try (default: 5)
--db-file fn
db file holding AEADs (see yhsm-init-oath-token(1)) (default: /var/yubico/yhsm-validation-server.db)
--clients-file fn
text file with mode OTP validation client shared secrets (see yhsm-init-oath-token(1)) (default: /var/yubico/yhsm-validation-
server.db)
--pid-file fn
write process id of server to this file
MODES
--otp Validate YubiKey OTP against entry in the YubiHSM internal database. Response should be compatible with those of yubikey-val-
server-php <http://code.google.com/p/yubikey-val-server-php/>.
--short-otp
Validate YubiKey OTP against entry in the YubiHSM internal database. Returns a single line with the decrypted information from the
OTP, compatible with yubikey-ksm <http://code.google.com/p/yubikey-ksm/>.
--hotp Validate codes using the OATH HOTP algorithm, performing the HMAC-SHA-1 inside the YubiHSM.
--pwhash
Validate that a string (a PBKDF2 hash of a password for example) matches the one in an AEAD. Can be used to protect legacy pass-
words within an AEAD only readable to a YubiHSM, but still recoverable if you know the AEAD key (since you put it in the YubiHSM).
CLIENTS FILE
This file holds HMAC-SHA-1 secrets shared between the validation client and server.
An example file, with a single entry for id 4711 would be :
# hash-style comments and blank lines are ignored
4711,grF5BERXEXPPpww1/TBvFg==
# end
EXIT STATUS
0 YubiHSM keystore successfully unlocked
1 Failed to unlock keystore
255 Client ID not found in internal database
BUGS
Report python-pyhsm/yhsm-validation-server bugs in the issue tracker <https://github.com/Yubico/python-pyhsm/issues/>
SEE ALSO
The python-yubico home page <https://github.com/Yubico/python-pyhsm/>
YubiHSMs can be obtained from Yubico <http://www.yubico.com/>.
python-pyhsm December 2011 yhsm-validation-server(1)