Sponsored Content
Top Forums Shell Programming and Scripting awk command not working as expected Post 302970458 by RudiC on Wednesday 6th of April 2016 05:49:19 PM
Old 04-06-2016
That definition is "local" (or temporary) to the sed command only. If not used this way, it would be "local" to your session only. The admin has to change it to affect other people.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk not working as expected with BIG files ...

I am facing some strange problem. I know, there is only one record in a file 'test.txt' which starts with 'X' I ensure that with following command, awk /^X/ test.txt | wc -l This gives me output = '1'. Now I take out this record out of the file, as follows : awk /^X/ test.txt >... (1 Reply)
Discussion started by: videsh77
1 Replies

2. Shell Programming and Scripting

Var substitution in awk - not working as expected

countA=`awk '/X/''{print substr($0,38,1)}' fName | wc -l` countB=`wc -l fName | awk '{print int($1)}'` echo > temp ratio=`awk -va=$countA -vc=$countB '{printf "%.4f", a/c}' temp` After running script for above I am getting an error as : awk: 0602-533 Cannot find or open file -vc=25. The... (3 Replies)
Discussion started by: videsh77
3 Replies

3. UNIX for Dummies Questions & Answers

Find command not working as expected

I have a script with a find command using xargs to copy the files found to another directory. The find command is finding the appropriate file, but it's not copying. I've checked permissions, and those are all O.K., so I'm not sure what I'm missing. Any help is greatly appreciated. This is... (2 Replies)
Discussion started by: mpflug
2 Replies

4. OS X (Apple)

Cat command not working as expected

I've been trying to figure this out since last night, and I'm just stumped. The last time I did any shell scripting was 8 years ago on a Unix box, and it was never my strong suit. I'm on a Mac running Leopard now. Here's my dilemma - hopefully someone can point me in the right direction. I'm... (10 Replies)
Discussion started by: Daniel M. Clark
10 Replies

5. Shell Programming and Scripting

bash variable (set via awk+sed) not working as expected

Hi! Been working on a script and I've been having a problem. I've finally narrowed it down to this variable I'm setting: servername=$(awk -v FS=\/ '{ print $7 } blah.txt | sed 's\/./-/g' | awk -v FS=\- '{print $1}')" This will essentially pare down a line like this: ... (7 Replies)
Discussion started by: creativedynamo
7 Replies

6. Shell Programming and Scripting

Read command not working as expected

I was trying to write a simple script which will read a text file and count the number of vowels in the file. My code is given below - #!/bin/bash file=$1 v=0 if then echo "$0 filename" exit 1 fi if then echo "$file not a file" exit 2 fi while read -n... (14 Replies)
Discussion started by: linux_learner
14 Replies

7. Shell Programming and Scripting

awk not working as expected in script

Dear all, I had script which used to work, but recently it is not working as expected. I have command line in my shell script to choose the following format from the output_elog and perform some task afterwards on As you see, I want all numbers in foramt following RED mark except for... (12 Replies)
Discussion started by: emily
12 Replies

8. Shell Programming and Scripting

Cp command not working as expected in HPUX

Hi, I'm having trouble with a simple copy command in a script on HPUX. I am trying to copy a file and append date & time. The echo command prints out what I am expecting.. echo "Backing up $file to $file.$DATE.$FIXNUM" | tee -a $LOGFILE + echo 'Backing up... (4 Replies)
Discussion started by: Glennyp
4 Replies

9. Shell Programming and Scripting

awk gsub not working as expected

Hi Experts, Need your kind help with gsub awk. Below is my pattern:"exec=1_host_cnt=100_dup=4_NameTag=targetSrv_500.csv","'20171122112948"," 100"," 1"," 1"," 4","400","","", " aac sample exec ""hostname=XXXXX commandline='timeout 10 openssl speed -multi 2 ; exit 0'"" ","-1","-1","1","... (6 Replies)
Discussion started by: pradyumnajpn10
6 Replies

10. Shell Programming and Scripting

awk matching script not working as expected

This is my ubuntu version: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial $ /bin/awk -V | head -n1 bash: /bin/awk: No such file or directory I have gotten a script that helps me to parse,... (14 Replies)
Discussion started by: delbroooks
14 Replies
KAS_INTERACTIVE(8)					       AFS Command Reference						KAS_INTERACTIVE(8)

NAME
kas_interactive - Enters interactive mode SYNOPSIS
kas interactive [-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 i [-a <admin principal to use for authentication>] [-p <admin password>] [-c <cell name>] [-s <explicit list of authentication servers>+] [-n] [-h] DESCRIPTION
The kas interactive command establishes an interactive session for the issuer of the command. By default, the command interpreter establishes an authenticated connection for the user logged into the local file system with all of the Authentication Servers listed in the local /etc/openafs/CellServDB file for the cell named in the local /etc/openafs/ThisCell file. To specify an alternate identity, cell name, or list of Authentication Servers, include the -admin_username, -cell, or -servers arguments respectively. Interactive mode lasts for six hours unless the maximum ticket lifetime for the issuer or the Authentication Server's Ticket Granting Service is shorter. There are two other ways to enter interactive mode, in addition to the kas interactive command: o Type the kas command at the shell prompt without any operation code. If appropriate, include one or more of the -admin_username, -password_for_admin, -cell, and -servers arguments. o Type the kas command followed by a user name and cell name, separated by an "@" sign (for example: kas admin@abc.com), to establish a connection under the specified identity with the Authentication Servers listed in the local /etc/openafs/CellServDB file for the indicated cell. If appropriate, provide the -servers argument to specify an alternate list of Authentication Server machines that belong to the indicated cell. There are several consequences of entering interactive mode: o The "ka>" prompt replaces the system (shell) prompt. When typing commands at this prompt, provide only the operation code (omit the command suite name, kas). o The command interpreter does not prompt for the issuer's password. The issuer's identity and password, the relevant cell, and the set of Authentication Server machines specified when entering interactive mode apply to all commands issued during the session. They cannot be changed without leaving the session, except by using the kas noauthentication command to replace the current authenticated connections with unauthenticated ones. The -admin_username, -password_for_admin, -cell, and -servers arguments are ignored if provided on a command issued during interactive mode. To establish an unauthenticated connection to the Authentication Server, include the -noauth flag or provide an incorrect password. Unless authorization checking is disabled on each Authentication Server machine involved, however, it is not possible to perform any privileged operations within such a session. To end the current authenticated connection and establish an unauthenticated one, issue the kas noauthentication command. To leave interactive mode and return to the regular shell prompt, issue the kas quit command. OPTIONS
-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
The following example shows a user entering interactive mode as the privileged user "admin". % kas interactive admin Password for admin: I<admin_password> ka> PRIVILEGE REQUIRED
None SEE ALSO
kas(8), kas_noauthentication(8), kas_quit(8) 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_INTERACTIVE(8)
All times are GMT -4. The time now is 02:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy