![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| regex to delete multiple blank lines in a file? | fedora | Shell Programming and Scripting | 6 | 10-11-2007 04:36 PM |
| using sed command to delete a string spanning multiple lines | radha.kalivar | Shell Programming and Scripting | 9 | 07-25-2007 10:26 AM |
| Delete multiple lines containting a variable string using SED. | selkirk | UNIX for Dummies Questions & Answers | 2 | 04-27-2007 07:08 PM |
| delete multiple empty lines | whatisthis | Shell Programming and Scripting | 3 | 11-09-2005 05:42 PM |
| Delete multiple lines w/ sed | bookoo | Shell Programming and Scripting | 2 | 07-25-2003 10:03 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Hi,
I'm new to this forum, and searched through the previous posts, but didn't see anything close enough to what i'm looking for. I have a radius file like this: Code:
testone Password = "11111"
Service-Type = "Framed-User",
Session-Timeout = "9000",
Ascend-Idle-Limit = "900"
testtwo Password = "11111"
Service-Type = "Framed-User",
Session-Timeout = "9000",
Ascend-Idle-Limit = "900"
testthree Password = "11111"
Framed-Address = "000.000.000.000",
Framed-Netmask = "255.255.255.0"
Ascend-Route-IP=Route-IP-Yes
Framed-Route = "000.000.000.000/29 000.000.000.000 1 n"
1testone Password = "11111"
Service-Type = "Framed-User",
Ascend-Idle-Limit = "900"
testtwo5 Password = "11111"
Service-Type = "Framed-User",
Session-Timeout = "9000",
Ascend-Idle-Limit = "900"
###EOF###
The main problem is there is no set number of lines below the username, it could be anywhere from 2-8 lines. The only constants are: The username will allways be at the beginning of a new line and the word password will always and only be on the same line as the username. I'm on a linux server, so any combination of sed, awk or perl should work. Thanks in advance for any help. |
|
||||
|
Quote:
|
|
||||
|
Quote:
Last edited by petebear; 10-14-2006 at 06:26 PM.. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|