The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
FTP is using shell scripts create ? for file a501420038 Shell Programming and Scripting 1 08-16-2007 03:39 PM
Need a simple file based utilty for shell scripts bobk544 Shell Programming and Scripting 4 05-01-2007 07:43 PM
Determine date and time the file was created through shell scripts BharatSurana Shell Programming and Scripting 1 01-11-2006 01:06 PM
Plz Help To convert xml file to text file using bourn shell scripts ram2s2001 Shell Programming and Scripting 0 11-09-2005 09:56 AM
Converting Text File into XML using Unix Shell Scripts Laud12345 Shell Programming and Scripting 10 02-16-2005 01:35 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-07-2008
bulkbiz bulkbiz is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 10
shell scripts to grep dn in ldif file

Hi gurus out there,

1)I am using ksh, in solaris 10.
2)I have one ldif file, I need to output user DN with attributes=<some pattern> to a file.

Example:

dn: uid=joy,ou=People,o=abc.com,o=isp
nswmExtendedUserPrefs: meAutoSign=true
nswmExtendedUserPrefs: meSignature=Regards, Joy
mailUserStatus: inactive

dn: uid=John,ou=People,o=abc.com,o=isp
nswmExtendedUserPrefs: meAutoSign=true
nswmExtendedUserPrefs: meSignature=Thanks, John
mailUserStatus: inactive

I NEED to ouput an ldif with the attribute:
nswmExtendedUserPrefs: meSignature=Regards

Note that the pattern is "regards"

Anyone can give hint?

I am totally newbie, pls help.
Many many thanks!!!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:57 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0