Sponsored Content
Top Forums Shell Programming and Scripting Read contains within { and replace the word Post 302992373 by drysdalk on Friday 24th of February 2017 08:59:50 AM
Old 02-24-2017
Hello,

I think I get the gist of what you're saying. What would be useful though would be if you could:

1. Provide an example entry in its original form
2. Provide a modified copy of that entry as you would want it to look afterwards

If you can provide something like that - an entire entry in the form it exists in the file, and a modified example of how you want it to look after your script has run - that would make things easier and clearer in terms of being able to help you come up with a solution.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How read and replace Microsoft word in Unix

Hi, I'm newbie in UNIX. I would like to ask how to read a file which in Microsoft word format? Inside the doc file is just a few sentences . "It is a text. Help me with it". and I would like to replace the the word of text to message. I was trying with this for i in `find . -type f -name... (8 Replies)
Discussion started by: tee
8 Replies

2. Shell Programming and Scripting

To read data word by word from given file & storing in variables

File having data in following format : file name : file.txt -------------------- 111111;name1 222222;name2 333333;name3 I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2). i.e val1=11111 &... (2 Replies)
Discussion started by: sjoshi98
2 Replies

3. Shell Programming and Scripting

Replace a word after a particular word in a file

Hi, I want to replace a word in a file which occurs after a particular word. For example : $cat file.txt CASE WHEN AND c1 = 'I' AND c2= '2' THEN 1 WHEN AND c1= 'I' AND c2= '0' THEN 2 So in this example i want to replace... (4 Replies)
Discussion started by: ashwin3086
4 Replies

4. Shell Programming and Scripting

How to replace a word with another word

Hello Friends, How to substitue with a word by another word in file written in VI Editor. Thanks & Regards Siva Ranganath 7760774961 (2 Replies)
Discussion started by: sivaranganath
2 Replies

5. Shell Programming and Scripting

Replace a word in a string starting with another word

Hi All, I have a file in which a number of lines are starting with similar first word but different next words. I want to replace the any nth word(not 1st or 2nd) with another word. Eg:- My file contains are like this:- Ram is a boy. Ram is a good boy. Ram plays cricket. Here I want to... (2 Replies)
Discussion started by: mukeshbaranwal
2 Replies

6. Shell Programming and Scripting

how to read argument with $ value in the word

Hi i am having a shell script reading two arguments. when the shell script is passed with argument containing $ in it, the value from $ onwards is getting truncated and my script is failing. i have to do in reading the arguments in the shell script only as i am not having control on the... (3 Replies)
Discussion started by: duddukuri
3 Replies

7. Shell Programming and Scripting

Find and replace a word in all the files (that contain the word) under a directory

Hi Everyone, I am looking for a simple way for replacing all the files under a directory that use the server "xsgd1234dap" with "xsdr3423pap". For Example: In the Directory, $pwd /home/nick $ grep -l "xsgd1234dap" *.sh | wc -l 119 I have "119" files that are still using... (5 Replies)
Discussion started by: filter
5 Replies

8. Shell Programming and Scripting

Read a File line by line and split into array word by word

Hi All, Hope you guys had a wonderful weekend I have a scenario where in which I have to read a file line by line and check for few words before redirecting to a file I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies

9. Shell Programming and Scripting

Shell Script @ Find a key word and If the key word matches then replace next 7 lines only

Hi All, I have a XML file which is looks like as below. <<please see the attachment >> <?xml version="1.0" encoding="UTF-8"?> <esites> <esite> <name>XXX.com</name> <storeId>10001</storeId> <module> ... (4 Replies)
Discussion started by: Rajeev_hbk
4 Replies

10. Shell Programming and Scripting

How do i replace a word ending with "key" using awk excpet for one word?

echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} | awk 'gsub(/^|abc,|$/,"") {print}' Required output {grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies
KAS_LIST(8)						       AFS Command Reference						       KAS_LIST(8)

NAME
kas_list - Displays all entries in the Authentication Database SYNOPSIS
kas list [-long] [-showadmin] [-showkey] [-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 ls [-l] [-showa] [-showk] [-a <admin principal to use for authentication>] [-p <admin password>] [-c <cell name>] [-se <explicit list of authentication servers>+] [-n] [-h] DESCRIPTION
The kas list command either displays all entries from the Authentication Database by name, or displays the full database entry for a defined set of entries, as determined by the flag provided: o To display every entry in the Authentication Database in full, include the -long flag. o To display only those entries in full that have the "ADMIN" flag set, include the -showadmin flag. o To list only the name of each Authentication Database entry, omit both the -long and -showadmin flags. By default, full entries include a checksum for the encryption key, rather than the actual octal digits that constitute the key. To display the octal digits, include the -showkey flag with the -long or -showadmin flag. OPTIONS
-long Displays every Authentication Database entry in full. Provide this flag or the -showadmin flag, or omit both to display just the name of every database entry. -showadmin Displays in full only the Authentication Database entries that have the "ADMIN" flag set. Provide this flag or the -long flag, or omit both to display just the name of every database entry. -showkey Displays the octal digits that constitute the key in each full entry. Provide either the -long or -showadmin flag along with this one. -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. OUTPUT
If neither the -long or -showadmin flag is provided, the output lists the name of each entry in the Authentication Database on its own line. If the -long flag is included, the output includes every Authentication Database entry in full. If the -showadmin flag is included, the output includes in full only the Authentication Database entries that have the "ADMIN" flag set. If the -showkey is provided along with either one, the output includes the octal digits that constitute the encryption key in each entry. A full Authentication Database entry includes the same information displayed by the kas examine command; for details, see that command's reference page. PRIVILEGE REQUIRED
The issuer must have the "ADMIN" flag set on his or her Authentication Database entry. SEE ALSO
kas(8), kas_examine(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_LIST(8)
All times are GMT -4. The time now is 07:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy