Sponsored Content
Full Discussion: Replace a word using sed
Top Forums Shell Programming and Scripting Replace a word using sed Post 302691171 by elixir_sinari on Friday 24th of August 2012 02:51:13 AM
Old 08-24-2012
And double quote $Name_replace "$Name_replace" to preserve white space in the new string (if any) and to prevent the sed command from breaking.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace word with using "sed" not work...

Hi, I have a xml text file with the following data, I would like replace F0</Number> to F</Number> only. i used sed to replace, but it not work!! anyone can help? <Number>11 20 03 22 23 21 91 00 F0</Number> <Number>12 20 03 20 99 21 91 20 F0</Number> <Number>10 21 03 21 78 21 92 27... (28 Replies)
Discussion started by: happyv
28 Replies

2. Shell Programming and Scripting

sed search and replace word assistance...

Hi, I am trying to write a shell script designed to take input line by line by line from a file with a word on each line for editing with sed. Example file: 1.ejverything 2.bllown 3.maikling 4.manegement 5.existjing 6.systems My design currently takes input from the user, and... (2 Replies)
Discussion started by: mkfitzwilliams
2 Replies

3. Shell Programming and Scripting

Sed - need to replace a word by another in 82 files.

HI everyone ;) I looking for help to use sed. I have 82 files. In each file I need to replace a word by another. All files are on the same directory.all files are texte files. I need to keep the same file name for all file that will be modified. Here is an exemple : file name :... (7 Replies)
Discussion started by: Aswex
7 Replies

4. 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

5. Shell Programming and Scripting

Replace word with sed

Hi there.! I'm trying to make a script that corrects wrong spelling. I want to use sed to replace wrong word with the correct one, but this must be made in a while loop that reads the wrong word from file (with read line) and the correct one from another file. I can't find a way to run sed like... (3 Replies)
Discussion started by: spiii
3 Replies

6. 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

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

sed command to replace a word with new line and /

Hi, I have been trying to replace the key word "SQL> spool off " with "/ show errors" with out double quotes in all the files in a directory. above show erros should be displayed next line Could you please help me how to do that. I have tried something like this... (3 Replies)
Discussion started by: pointers
3 Replies

9. Shell Programming and Scripting

Using sed to replace a word at specific location

I'm try to change a the prohibit to aix for the lines starting with ssh and emagent and rest should be the same. Can anyone please suggest me how to do that using a shell script or sed passwd account required /usr/lib/security/pam_prohibit passwd session required ... (13 Replies)
Discussion started by: pjeedu2247
13 Replies

10. Shell Programming and Scripting

Replacing a particular word with another word in all the xml's under a particular directory with sed

Hi Folks, Could you please advise what will be the SED command to replace a word in all xml's under a particular directory for example let say I rite now at the following below location $ cd /ter/rap/config now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
1 Replies
RADIUS.CONF(5)						      BSD File Formats Manual						    RADIUS.CONF(5)

NAME
radius.conf -- RADIUS client configuration file SYNOPSIS
/etc/radius.conf DESCRIPTION
radius.conf contains the information necessary to configure the RADIUS client library. It is parsed by rad_config(3). The file contains one or more lines of text, each describing a single RADIUS server which will be used by the library. Leading white space is ignored, as are empty lines and lines containing only comments. A RADIUS server is described by three to five fields on a line: Service type Server host Shared secret Timeout Retries The fields are separated by white space. The '#' character at the beginning of a field begins a comment, which extends to the end of the line. A field may be enclosed in double quotes, in which case it may contain white space and/or begin with the '#' character. Within a quoted string, the double quote character can be represented by '"', and the backslash can be represented by '\'. No other escape sequences are supported. The first field gives the service type, either 'auth' for RADIUS authentication or 'acct' for RADIUS accounting. If a single server provides both services, two lines are required in the file. Earlier versions of this file did not include a service type. For backward compatibil- ity, if the first field is not 'auth' or 'acct' the library behaves as if 'auth' were specified, and interprets the fields in the line as if they were fields two through five. The second field specifies the server host, either as a fully qualified domain name or as a dotted-quad IP address. The host may optionally be followed by a ':' and a numeric port number, without intervening white space. If the port specification is omitted, it defaults to the 'radius' or 'radacct' service in the /etc/services file for service types 'auth' and 'acct', respectively. If no such entry is present, the standard ports 1812 and 1813 are used. The third field contains the shared secret, which should be known only to the client and server hosts. It is an arbitrary string of charac- ters, though it must be enclosed in double quotes if it contains white space. The shared secret may be any length, but the RADIUS protocol uses only the first 128 characters. N.B., some popular RADIUS servers have bugs which prevent them from working properly with secrets longer than 16 characters. The fourth field contains a decimal integer specifying the timeout in seconds for receiving a valid reply from the server. If this field is omitted, it defaults to 3 seconds. The fifth field contains a decimal integer specifying the maximum number of attempts that will be made to authenticate with the server before giving up. If omitted, it defaults to 3 attempts. Note, this is the total number of attempts and not the number of retries. Up to 10 RADIUS servers may be specified for each service type. The servers are tried in round-robin fashion, until a valid response is received or the maximum number of tries has been reached for all servers. The standard location for this file is /etc/radius.conf. But an alternate pathname may be specified in the call to rad_config(3). Since the file contains sensitive information in the form of the shared secrets, it should not be readable except by root. FILES
/etc/radius.conf EXAMPLES
# A simple entry using all the defaults: acct radius1.domain.com OurLittleSecret # A server still using the obsolete RADIUS port, with increased # timeout and maximum tries: auth auth.domain.com:1645 "I can't see you" 5 4 # A server specified by its IP address: auth 192.168.27.81 $X*#..38947ax-+= SEE ALSO
libradius(3) C. Rigney, et al, Remote Authentication Dial In User Service (RADIUS), RFC 2138. C. Rigney, RADIUS Accounting, RFC 2139. AUTHORS
This documentation was written by John Polstra, and donated to the FreeBSD project by Juniper Networks, Inc. BSD
October 30, 1999 BSD
All times are GMT -4. The time now is 04:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy