I need to assign a variable within a variable in a sed command.
I tried doing the following in c shell.
set left = 1
set right = 2
set segment = qwerty
sed -n -e "/$segment{$left}/,/$segment{$right}/p" file.txt
what is wrong with this syntax? (3 Replies)
Hi,
Is there any way to assign defaults values to the shell variables without reassigning them ( restarting the session)
for example
after login the value of ORACLE_HOME=/a/b/c
i have changed this value from the console
export ORACLE_HOME=/c/d
now what if i want the value exported to... (1 Reply)
Hi GUYS,
I have function. I am assigning a line count to count variable. But it is throwing an error at this line.
function_recur (){
#file being created in this function
lenth = `wc -l function_outpu.dat`;
echo $lenth;
}
this is the error i got
rec.ksh: lenth: not found.
... (3 Replies)
Hi,
I am having a line which is separated by -
I need to extract each field and put into some variable.
a=`echo "this-is-the-case" | awk -F- '{print $1}' `
b=`echo "this-is-the-case" | awk -F- '{print $2}' `
c=`echo "this-is-the-case" | awk -F- '{print $3}' `
d=`echo "this-is-the-case" | awk... (2 Replies)
Hi All,
I have a tcsh script as:
#!/usr/bin/csh -x
set packsName=$(awk -F'' '/^execute.*=true/{print $2}' ExecutePacks.config)
for var in $packsName
do
echo "printed $var"
done
I want to assign the value which is returned by awk function to the variable called packsName.
How do I... (2 Replies)
Hi Gurus,
I have a file named log with 2 lines
Each line is a file name. eg
$ cat log
monday
tuesday
I need to read log and assign each output(filename) to a different variable.
The following doesn't work:-
while read A B
do
echo " a is ${A} "
echo " b is ${B} "
done <... (6 Replies)
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
LEARN ABOUT CENTOS
kas_unlock
KAS_UNLOCK(8) AFS Command Reference KAS_UNLOCK(8)NAME
kas_unlock - Unlocks a locked user account
SYNOPSIS
kas unlock -name <authentication ID>
[-admin_username <admin principal to use for authentication>]
[-password_for_admin <admin password>] [-cell <cell name>]
[-servers <explicit list of authentication servers>+]
[-noauth] [-help]
kas u -na <authentication ID>
[-a <admin principal to use for authentication>]
[-p <admin password>] [-c <cell name>]
[-s <explicit list of authentication servers>+] [-no] [-h]
DESCRIPTION
The kas unlock command unlocks the Authentication Database entry named by the -name argument. An entry becomes locked when the user exceeds
the limit on failed authentication attempts, generally by providing the wrong password to either an AFS-modified login utility or the klog
command. Use the kas setfields command to set the limit and the lockout time, and the kas examine command to examine the settings.
To unlock all locked user accounts at once, shutdown the kaserver process on every database server machine, and remove the
/var/lib/openafs/local/kaauxdb file from each one. The kaserver process recreates the file as it restarts.
OPTIONS -name <authentication ID>
Names the Authentication Database entry to unlock.
-admin_username <admin principal>
Specifies the user identity under which to authenticate with the Authentication Server for execution of the command. For more details,
see kas(8).
-password_for_admin <admin password>
Specifies the password of the command's issuer. If it is omitted (as recommended), the kas command interpreter prompts for it and does
not echo it visibly. For more details, see kas(8).
-cell <cell name>
Names the cell in which to run the command. For more details, see kas(8).
-servers <authentication servers>+
Names each machine running an Authentication Server with which to establish a connection. For more details, see kas(8).
-noauth
Assigns the unprivileged identity "anonymous" to the issuer. For more details, see kas(8).
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
In the following example, an administrator using the "admin" account unlocks the entry for "jones":
% kas unlock -name jones -admin_username admin
Administrator's (admin) Password:
PRIVILEGE REQUIRED
The issuer must have the "ADMIN" flag set on his or her Authentication Database entry.
SEE ALSO kas(8), kas_examine(8), kas_setfields(8), klog(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 KAS_UNLOCK(8)