Sponsored Content
Top Forums Shell Programming and Scripting sed question - replacing param values Post 302221527 by joeyg on Monday 4th of August 2008 04:30:07 PM
Old 08-04-2008
Hammer & Screwdriver There is one extra * and $

> new_value=4
> cat file1 | sed s/[^{PARAMETER}=]/${new_value}/
PARAMETER=4
PARAMETER4=1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replacing a line that may have different values on different servers

Replace disable_functions in php.ini with value of your choice which may be different on different servers ================================================ -bash-2.05b# grep disable_functions /usr/local/lib/php.ini disable_functions = 1 2 e weq t ret rye y etyhty rt et e ... (3 Replies)
Discussion started by: fed.linuxgossip
3 Replies

2. Shell Programming and Scripting

Replacing File values

Currently I am using the tr command in 3 scenarios for a ksh script. 1) Replacing any spaces in the file with a ~ tr ' ' '~' <$orignalFile> $newFile 2) After certain processing is done at the end of the scirpt i convert the Tilde back to spaces tr ' ' '~' <$newFile> $newFile2 3) Last... (4 Replies)
Discussion started by: hgjdv
4 Replies

3. Shell Programming and Scripting

check for param values

I need to check for 4ht parameter values, if they are not in (17,18) in other words if they r not equal to 17 or 18 then exit. can u help pls (4 Replies)
Discussion started by: raopatwari
4 Replies

4. Shell Programming and Scripting

Replacing string values from a File

I want to replace string values from a file to a file For eg : File1 has 30 lines of string with values, those specific values needs to be changed in file2 and remaining values in file2 should be as it is. For example: From file (File1) cluster.name=secondaryCluster To replace File... (9 Replies)
Discussion started by: sriram003
9 Replies

5. Shell Programming and Scripting

Replacing column values

hi all , ( perl) i am trying to replace jst one column in a file for eg month dayofweek dealar car-name jan thurs mercedes c300 feb wed lexus is300 all this data is in a master file and i want to replace jan with 1 feb... (5 Replies)
Discussion started by: technoman
5 Replies

6. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

7. Shell Programming and Scripting

Replacing values into a single column. sed/PERL

Hello everyone, i need to replace in the second column of my csv file, points by nothing and dash by comma like this: Input: 1 2 1;12.111.312-2;1.2;2;1-3 2 1 1;11.212.331-1;3.3;1;2-2 Output: 1 2 1;12111312;2;1.2;2;1-3 2 1 1;11212331;1;3.3;1;2-2 SED or PERL commands preferably. ... (7 Replies)
Discussion started by: satir
7 Replies

8. Shell Programming and Scripting

Formatting and replacing according to block values

please consider the following file, there are repeated blocks of m values, and nested s values within. there are 2 columns (cols 3 and 4)associated with each m,s combination. All s1 rows must get a value of a(col 3 in output), all s2 values must get a value of b(col 3 in output). If s1 and s2 rows... (1 Reply)
Discussion started by: senhia83
1 Replies

9. UNIX for Dummies Questions & Answers

Help in replacing column values

Hello All, I am having the file as below .I need to replace column 9-12 with some other values. In the below file I need to replace 1509 to 1508 and 1508 to 1507 .Can you please help me in how to do that Thanks, Arun ... (10 Replies)
Discussion started by: arunkumar_mca
10 Replies

10. UNIX for Beginners Questions & Answers

Replacing values inside a file.

Good day guys, I'm having trouble in creating a logic when it comes to replacing the values inside a file. I tried using sed command but it just doesn't work the way I want it to be. Here is what I'm trying to achieve. If my input file contains the values below. NAME++GUEST1 ++GUESS2++... (3 Replies)
Discussion started by: asdfghjkl
3 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 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy