![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| need to search text and output previous lines | grinds | Shell Programming and Scripting | 8 | 05-07-2008 10:31 AM |
| search for lines in a file | shalua | Shell Programming and Scripting | 9 | 04-23-2008 12:28 AM |
| View all lines in grep search | wereyou | UNIX for Dummies Questions & Answers | 1 | 12-13-2007 06:38 PM |
| Can I search columns and print lines? | Ant1815 | UNIX for Dummies Questions & Answers | 2 | 04-26-2007 08:01 AM |
| Don't want destroy windows! Ask skills | zhshqzyc | Debian | 1 | 03-28-2006 05:06 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Looking for a good way to search & destroy lines
What is a good way to find an entry in a .conf file and then remove all lines associated with that entry?
I have a Samba server running on Linux that I would like to easily add/remove share entries in the smb.conf file without removing or deleting lines that are not associated with that section. So a typical file would look like this. [xxxuser] comment = xxxuser Testing path = /samba/xxxuser Read Only = NO [drew] path = /tmp [testgroup] path = /samba/testgroup read only = No So if I wanted to remove [drew] share I guess I would just need to remove all lines including [drew] between the ending ] and the beginning [ ? Any script ideas? Thanks, |
| Bookmarks |
| Tags |
| linux |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|