Sponsored Content
Top Forums UNIX for Dummies Questions & Answers finding a numeric value in a file for replacement Post 4830 by alex blanco on Wednesday 1st of August 2001 01:06:43 PM
Old 08-01-2001
Replacement

if u can edit this file using vi do it, then....

:g/old_value/s//new_value/g (enter)

and every "old_value" will be changed into the "new_value" all file along.

c-u.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How To Add Numeric Data of A file

Dear All, I want to add Numeric data of my file called temp_f41. But I am not getting how to add them, My File data are in following format of: 10 39 53 05 37 54 Plz send me code for this Thanks Nishant :mad: (3 Replies)
Discussion started by: krishna_sicsr
3 Replies

2. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

3. Shell Programming and Scripting

Replacement of text in a file

Hi , I have some data in my file(properties.txt) like this. # agent.properties agent.dmp.Location= agent.name= I need to relpace the agent.dmp.location with agent.dmp.Location = /opt/VRTS/vxvm I am using the follwing to replace the string AGENT_NAME=snmp... (2 Replies)
Discussion started by: raghu.amilineni
2 Replies

4. Shell Programming and Scripting

PERL:How to convert numeric values txt file to PACKED DECIMAL File?

Is there any way to convert numeric values txt file to PACKED DECIMAL File using PERL. Regards, Alok (1 Reply)
Discussion started by: aloktiwary
1 Replies

5. Shell Programming and Scripting

How to check if the file contains only numeric values

How to check if the file contains only numeric values. I don't want to read entire file it eats lot of cpu Or any way which consumes less memory n cpu.. Please suggest -S (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies

6. Shell Programming and Scripting

How to check if a column is having a numeric value or not in a file?

Hi, I want to know, how we find out if a column is having a numeric value or not. For Example if we have a csv file as ASDF,QWER,GHJK,123,FGHY,9876 GHTY,NVHR,WOPI,623,HFBS,5386 we need to find out if the 4th and 6th column has muneric value or not. Thanks in advance Keerthan (9 Replies)
Discussion started by: keerthan
9 Replies

7. UNIX for Dummies Questions & Answers

Find and Replace random numeric value with non-numeric value

Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is: 1702938475,SNU022,201004 the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies

8. Shell Programming and Scripting

Finding BEGINNING & ENDING positions of sequentially increasing sublists from a perl numeric array

I have got an Perl array like: @array = (1,2,3,4,5,6,1,2,3,4,1,2,1,2,3,4,5,6,7,8,9...............) This numeric sequence will be always sequentially increasing, unless it encounters, The beginning of the new sequentially increasing numeric sequence. SO in this array we get sequentially... (5 Replies)
Discussion started by: teknokid1
5 Replies

9. Shell Programming and Scripting

File Replacement Help

Hi all, I have two files, one is a base file and the other is a dependency file. I need to replace a section in the base file (File A) with a section from the dependency file (File B), for example: File A: ... <TagName> <TagA>MyBaseFile</TagA> <TagB>MyBaseFileID</TagB> </TagName>... (5 Replies)
Discussion started by: muay_tb
5 Replies

10. Shell Programming and Scripting

Parsing of Char and Numeric in a file

Hi All, i'm working on some report and currently have this plain text file generated. server_name1|sdfd1deal | 1048572| 1040952| 99| 207| 1| 1 server_name1|dba1dbs | 83886048| 40730796| 48| 5762| 22764| 8... (4 Replies)
Discussion started by: fedora132010
4 Replies
WebKDC::Token(3pm)					User Contributed Perl Documentation					WebKDC::Token(3pm)

NAME
WebKDC::Token - token objects for use with WebAuth SYNOPSIS
use WebKDC::Token; # includes WebKDC::{App,Id,Proxy,Request,Response,Service}Token # manually create a new token, and then encode/encrypt it my $id_token = new WebKDC::IdToken; $id_token->subject_auth('krb5'); $id_token->subject_auth_data($sad); $id_token->creation_time(time()); $id_token->expiration_time($et); my $id_token_str = bas64_encode($id_token->to_token($key)); # parse an encrypted/encoded token, given the encrypted/encoded token, # the keyring used to encrypt it, and an optional time to live. If the # TTL is not zero, the token is treated as invalid if its creation time is # more than ttl ago (this is not needed if the token had an expiration # time set when it was created). my $req_token = new WebKDC::RequestToken($req_token_str, $key, $ttl); DESCRIPTION
WebKDC::Token is the base class for all the Token objects, which are available upon using WebKDC::Token: WebKDC::AppToken WebKDC::IdToken WebKDC::ProxyToken WebKDC::RequestToken WebKDC::ErrorToken WebKDC::CredToken WebKDC::WebKDCProxyToken WebKDC::WebKDCServiceToken It contains the functions that are common across all the token objects, as well as some functions that must be overridden in the subclasses. EXPORT
None METHODS
to_token(key_or_keyring) $binary_token = $token->to_token($key_or_keyring); Takes a token object and encrypts/encodes it into a binary string. WebAuth::base64_encode should be used if the token needs to base64 encoded. to_string() $str = $token->to_string(); used mainly for debugging to get a dump of all the attributes in a token. The Token object all overloads '""', so calling this function is optional, you can just use a token object as a string to get the same result. new $token = new WebKDC::SubclassToken; $token = new WebKDC::SubclassToken($binary_token, $key_or_ring, $ttl); The new constructor for tokcns is used to create a token object. The first form is used to construct new tokens, while the second form is used to parse a binary token into a token object. Note, only subclasses of Token should be constructed using new. To parse an unknown token, use the parse class method. parse $token = WebKDC::Token::parse($binary_token, $key_or_ring, $ttl); Used to create a from a binary token when you don't know ahead of time what the resulting token type will be. The type of the returened token can be checked with token_type() or the UNIVERSAL isa method. validate_token This method should be overridden by subclasses. It is used to validate that a particular token contains the correct attributes. It gets called by the to_token method before the token is encoded, and by the constructor with args after a token has been parsed. init This method should be ovveridden by subclasses and is used to initialize a token when the constructor with no args is called. token_type([$new_value]) $token->token_type($new_value); $type = $token->token_type(); The first form is used to set the token type, the second form is used to get the token type. WebKDC::AppToken The WebKDC::AppToken object is used to represent WebAuth app-tokens. $token = new WebKDC::AppToken; $token = new WebKDC::AppToken($binary_token, $key_or_ring, $ttl); $token->app_data($name[, $new_value]) $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->lastused_time([$lastused_time]) $token->subject([$new_value]) $token->session_key([$new_value]) $token->initial_factors([$new_value, ...]) $token->session_factors([$new_value, ...]) $token->loa([$new_value]) WebKDC::CredToken The WebKDC::CredToken object is used to represent WebAuth cred-tokens. $token = new WebKDC::CredToken; $token = new WebKDC::CredToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->cred_type([$new_value]) $token->cred_subject([$new_value]) $token->cred_data([$new_value]) $token->subject([$new_value]) WebKDC::IdToken The WebKDC::IdToken object is used to represent WebAuth id-tokens. $token = new WebKDC::IdToken; $token = new WebKDC::IdToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->subject([$new_value]) $token->subject_auth([$new_value]) $token->subject_auth_data([$new_value]) $token->initial_factors([$new_value, ...]) $token->session_factors([$new_value, ...]) $token->loa([$new_value]) WebKDC::LoginToken The WebKDC::LoginToken object is used to represent WebAuth login-tokens. $token = new WebKDC::LoginToken; $token = new WebKDC::LoginToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->password([$new_value]) $token->otp([$new_value]) $token->username([$new_value]) WebKDC::ProxyToken The WebKDC::ProxyToken object is used to represent WebAuth proxy-tokens. $token = new WebKDC::ProxyToken; $token = new WebKDC::ProxyToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->proxy_type([$new_value]) $token->subject([$new_value]) $token->webkdc_token([$new_value]) $token->initial_factors([$new_value, ...]) $token->session_factors([$new_value, ...]) $token->loa([$new_value]) WebKDC::RequestToken The WebKDC::RequestToken object is used to represent WebAuth request-tokens. $token = new WebKDC::RequestToken; $token = new WebKDC::RequestToken($binary_token, $key_or_ring, $ttl); $token->app_state([$new_value]) $token->creation_time([$new_value]) $token->proxy_type([$new_value]) $token->request_options([$new_value]) $token->requested_token_type([$new_value]) $token->return_url([$new_value]) $token->subject_auth([$new_value]) $token->initial_factors([$new_value, ...]) $token->session_factors([$new_value, ...]) $token->loa([$new_value]) WebKDC::ErrorToken The WebKDC::ErrorToken object is used to represent WebAuth error-tokens. $token = new WebKDC::ErrorToken; $token = new WebKDC::ErrorToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->error_code([$new_value]) $token->error_message([$new_value]) WebKDC::WebKDCProxyToken The WebKDC::WebKDCProxyToken object is used to represent WebAuth webkdc-proxy-tokens. $token = new WebKDC::WebKDCProxyToken; $token = new WebKDC::WebKDCProxyToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->proxy_data([$new_value]) $token->proxy_subject([$new_value]) $token->proxy_type([$new_value]) $token->subject([$new_value]) $token->initial_factors([$new_value, ...]) $token->loa([$new_value]) WebKDC::WebKDCServiceToken The WebKDC::WebKDCServiceToken object is used to represent WebAuth webkdc-service-tokens. $token = new WebKDC::WebKDCServiceToken; $token = new WebKDC::WebKDCServiceToken($binary_token, $key_or_ring, $ttl); $token->creation_time([$new_value]) $token->expiration_time([$new_value]) $token->subject([$new_value]) $token->session_key([$new_value]) AUTHOR
Roland Schemers (schemers@stanford.edu) SEE ALSO
WebAuth. perl v5.14.2 2012-04-25 WebKDC::Token(3pm)
All times are GMT -4. The time now is 07:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy