Sponsored Content
Full Discussion: Help in sed required.
Top Forums Shell Programming and Scripting Help in sed required. Post 302222077 by era on Wednesday 6th of August 2008 02:18:02 AM
Old 08-06-2008
You could add something to skip up through "access to *" before making the substitution.

Code:
sed -e '1,/^access to \*/b' -e '/by users read/a\''by peername.ip=127.0.0.1 read' slapd_config

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed script required

Collegues I have a flat file with data in following structure. (S1 (S (NP (NP (DT The) (JJ beautiful) (NN view)) (PP (IN of) (NP (JJ outside) (NNP greenery)))) (VP (VBZ adds) (NP (DT a) (NN tranquil) (NN touch)) (PP (TO to) (NP (DT this) (NN place)))) (. .))) I have to extract the contents in... (2 Replies)
Discussion started by: jaganadh
2 Replies

2. UNIX for Dummies Questions & Answers

Sed-- command help required

Hi Gurus, I have a small requirement. Let suppose i have a file test.txt test.txt contains Dispatched date = '2008-04-08' Name = 'Logers' Now i want to add one more line to it as Number of Responses = "$a" $a will be chnaging dynamically which i had grepped it in the script. Now i... (6 Replies)
Discussion started by: pssandeep
6 Replies

3. Shell Programming and Scripting

Help required in sed or awk.

Hi All, I need to pick up data on both sides of "=" sign. For eg, following is the context that I have. 125.156.125.147=machine1 147.125.185.156=machine2 147.125.185.159=machine3 Can I have the ip address in one variable and machine name in another variable using sed or awk. ... (1 Reply)
Discussion started by: nua7
1 Replies

4. Shell Programming and Scripting

Help required with awk/sed

Hi I have a file, with format like: column1|coulumn2|column3|column4 A|X|K|18 L|O|R|31,42,25 G|H|I|55,66 L|E|Q|25,31,94 output required: column1|coulumn2|column3|column4 A|X|K|18 L|O|R|31,25 L|E|Q|25,31 Input File Format: All columns are seperated using |, last column... (8 Replies)
Discussion started by: New to awk
8 Replies

5. Shell Programming and Scripting

sed help required

Hi All, I have one file with below type of data in it, $ cat test.txt ###123 ###xyxytuerwb ###2 ###tyupe Here I would like to replace all the characters with "x" after the 3 "###" with the same number of characters. Can you please help me to achieve this. (7 Replies)
Discussion started by: gr8_usk
7 Replies

6. UNIX for Dummies Questions & Answers

Clarification required on sed

Hi Can some one tell what does this sed command do sed 's/*$//g I am more curious on the highlighted part , can some one explain what does that mean. Thanks Sri (1 Reply)
Discussion started by: Sri3001
1 Replies

7. Shell Programming and Scripting

sed replacing required newlines

hi i have a requirement to replace a string with another using sed and to get the result newline separated but after sed replacement the newline vanishes below is sample code #!/bin/ksh set -x string="name sam\nage 45 \nsport soccer" echo $string string=`echo $string | sed... (2 Replies)
Discussion started by: midhun19
2 Replies

8. Shell Programming and Scripting

Tricky sed required

Hi All I need to put some sed together for a task and its a bit advanced for me, so I thought I'd ask if anyone here could help. I have a csv file with content like this - "","abcde","","" "'","abcde","","" "","","","1234" "'e'","","","" I need to remove any single quotes that fall... (17 Replies)
Discussion started by: steadyonabix
17 Replies

9. Shell Programming and Scripting

sed pattern matching help required

Hi I am trying to pattern match with sed, if it finds a match I need it to insert characters at the 28th position, its working but its also adding an extra space and I don't know why, below is the code. sed 's/715023044/\n&/g' $asn | sed '/^71502304413-000/s/./B4/28' | sed -e :a -e... (4 Replies)
Discussion started by: firefox2k2
4 Replies

10. Shell Programming and Scripting

REGEX help required and some sed/awk help as well

Hi guys, I am coding a bash script that makes use of php scripts to pull URL's from a website. These url links will have numbers in them like 0.2.3 I want to make a regex that will yield me such numbers if I use a command like preg_grep. Question1: I need a regex that will tell my preg_grep... (2 Replies)
Discussion started by: mojoman
2 Replies
userdbget(1M)															     userdbget(1M)

NAME
userdbget - display information residing in the user database, /var/adm/userdb SYNOPSIS
name [attr]... [attr]... DESCRIPTION
displays the per-user information residing in the user database as a sequence of pairs. Each pair is printed on a separate line and is preceded by the username. A per-user value in the user database, overrides any system-wide default configured in See userdb(4) and secu- rity(4) for more details about the user database and system-wide defaults, respectively. If no attr arguments are specified on the command line, displays all configurable attributes of users in the user database. If one or more attr arguments are specified, displays only those attributes. Options The following options are recognized: Display attributes of all users in the user database. Display internal attributes, in addition to the configurable ones. Internal attributes are not user configurable and are normally modified only by programs that enforce system security. The file indicates which attributes are configurable and which are internal. Display attributes for only the specified user name. Notes Only users who have read and write access to can run RETURN VALUE
exits with one of the following values: success invalid user invalid usage insufficient permission to access the user database file system error invalid attribute; does not allow a per-user value an attribute value is not within the range specified in block overflow entry overflow database lock failure database is disabled; see userdb(4) invalid user name not a local user EXAMPLES
In the following example, all attributes for user are printed. The audit flag for user is enabled. The display last login feature is dis- abled. In the next example, only specific attributes are printed. The audit flag for user is enabled. No value is printed for because that attribute is not defined for user the minimum password length for user is the system-wide default defined in (see security(4)). In the last example, prints all configurable attributes of all users in the user database. FILES
user database security defaults configuration file security attributes description file SEE ALSO
userdbck(1M), userdbset(1M), userdb_read(3), security(4), userdb(4). userdbget(1M)
All times are GMT -4. The time now is 08:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy