12-26-2016
It is always helpful to post EXACTLY what "doesn't work" and so keep people from guessing.
Any output? No output? Error messages?
Both scripts need to be run in sequence, and the data file name needs to be "filename", so either rename your file or adapt/correct in the second script line 7. On top, it would be beneficial to remove the ^M (\r, 0x0D) DOS line terminators from the input file.
It were benficial also if the requirements and data structures DON'T change between posts (compare #1 and #6).
10 More Discussions You Might Find Interesting
1. Programming
I need a c function which return the time in:
hour min sec and mil sec
I am writing on unix os. (3 Replies)
Discussion started by: kamil
3 Replies
2. Programming
Hi,
I need to time a certain function in my C/C++ code and I am experiencing some difficulties. I timed it using wallclock time so I know that it takes approximately 500-600 microseconds with
gettimeofday(&start, NULL);
// my function call
gettimeofday(&end, NULL);
answer = (end.tv_sec -... (2 Replies)
Discussion started by: zynnel
2 Replies
3. Shell Programming and Scripting
Hi,
I would like to display the exact time taken to complete running a particular tool or function or program to user
I don't know the exact time functions in unix, please help me
thanks in advance
Example:
$test.ksh
output should be
The... (10 Replies)
Discussion started by: hsekol
10 Replies
4. Programming
Hello
I have problem with function 'time' to test my program for file copying .
How to run the function in my source code ?
I try something like that:
system("time"); < -- but this don't working (2 Replies)
Discussion started by: scotty_123
2 Replies
5. Shell Programming and Scripting
Hi All,
I am using solaris and nawk.
Is there any time function in nawk which is simliar to the shell `date` function ?
Can any experts show any examples? (4 Replies)
Discussion started by: Raynon
4 Replies
6. Shell Programming and Scripting
HI ,
I need to get the timedifference between two values... which funcation will help
eg: difference betweem 19:22 and 19:43 should give 21 mins (2 Replies)
Discussion started by: savitha
2 Replies
7. UNIX for Dummies Questions & Answers
hello everybody!
i want to post a question. So, I use the command 'time a.out' to time the duration of the program a.out. The return value of this function was:
real 0m4.116s
user 0m4.112s
sys 0m0.016s
What i want is! I try to find a way to get (NOT manually) the value of real time.... (2 Replies)
Discussion started by: nicos
2 Replies
8. Red Hat
HI
I have a Red Hat Enterprise with Real Time kernel.
Are you aware if there are C functions for this kernel or some code/library for this OS for measuring time more lightweight than clock_gettime and gettimeofday? THe hardware I have is NUMA.
Reading forums I found gethrtime but it is... (1 Reply)
Discussion started by: manustone
1 Replies
9. Shell Programming and Scripting
Hello, I have made a Linux Shell Script that downloads 6 files from the Internet and then deletes them. Now i want to use the function "/usr/bin/time" and "bc" to calculate how long the avergate run time for the shell script is. I therefore need to do it 100 times. My shell script code is below:
... (6 Replies)
Discussion started by: solo2
6 Replies
10. OS X (Apple)
Hi guys and gals...
I am writing a piece of code that is dash compliant and came across this error.
I have put it in the OSX section as that is what I am using.
I have no idea what the 'dash' version is but was installed about 6 months ago.
MBP, OSX 10.12.6, default terminal running dash on... (4 Replies)
Discussion started by: wisecracker
4 Replies
LEARN ABOUT DEBIAN
wa_keyring
WA_KEYRING(1) WebAuth WA_KEYRING(1)
NAME
wa_keyring - WebAuth keyring manipulation tool
SYNOPSIS
wa_keyring [--hv] -f file command [arg ...]
wa_keyring -f keyring add valid-after
wa_keyring -f keyring gc oldest-valid-after-to-keep
wa_keyring -f keyring list
wa_keyring -f keyring remove id
DESCRIPTION
wa_keyring is a command line tool to manage WebAuth key ring files, which contain the private AES keys used by mod_webauth and mod_webkdc.
It supports the following individual commands:
add valid-after
Adds a new key to the key ring. valid-after uses the format:
nnnn[s|m|h|d|w]
to indicate a time relative to the current time. The units for the time are specified by appending a single letter. That letter can be
any of s, m, h, d, or w, which correspond to seconds, minutes, hours, days, and weeks respectively.
For example: 10d is 10 days from the current time, and -60d is 60 days before the current time.
gc oldest-valid-after-to-keep
Garbage collects (removes) old keys on the key ring. Any keys with a valid-after date older then the specified time will be removed
from the key ring.
The format for oldest-valid-after-to-keep is the same as valid-after from the add command. Note that this means that times given to
the gc command should generally be negative, to remove keys that have expired in the past.
list
Lists all the keys in the key ring. By default, a brief listing is used, but a verbose listing can be requested with the -v option.
The following fields are present in a short listing:
id The index/position of the key in the key ring.
Created
The date the key was created.
Valid after
The date at which the key becomes valid (in other words, the point at which the WebAuth server will start using it to encrypt and
decrypt new data).
Fingerprint
The MD5 digest of the key data. Used to compare keys in two key rings.
The following fields are present in the long listing:
Key-Id
The index/position of the key in the key ring.
Created
The date the key was created.
Valid-After
The date at which the key becomes valid (in other words, the point at which the WebAuth server will start using it to encrypt and
decrypt new data).
Key-Type
The type of key. Currently, AES is the only supported key type.
Key-Size
Length in bytes of the key.
Fingerprint
The MD5 digest of the key data. Used to compare keys in two key rings.
remove id
Remove the key with ID id from the key ring.
EXAMPLES
Add a key to the keyring valid as of the current time:
wa_keyring -f keyring add 0d
Add a key to the keyring that will be valid three days from now:
wa_keyring -f keyring add 3d
Remove keys from the key ring that became invalid more than 90 days ago:
wa_keyring -f keyring gc -90d
Remove the first key in the keyring.
wa_keyring -f keyring remove 0
Display a verbose listing of all of the keys in the key ring:
wa_keyring -f keyring -v list
Note that a WebAuth server will normally manage its keyring file by itself, and wa_keyring is normally only used for debugging purposes.
However, if you are setting up a load-balanced pool of servers that need to all share the same keys, turn off automatic keyring handling by
putting the line:
WebAuthKeyringAutoUpdate off
to your Apache configuration, running a script periodically from cron on one server that does something like:
wa_keyring -f keyring gc -90d
wa_keyring -f keyring add 2d
and then copying (in a secure manner!) the new keyring file to all of the other servers.
AUTHOR
Roland Schemers <schemers@stanford.edu>
4.1.1 2012-04-25 WA_KEYRING(1)