Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extract out mail ID from from profile list Post 302402950 by indoo.pathak on Thursday 11th of March 2010 02:42:19 AM
Old 03-11-2010
Extract out mail ID from from profile list

HI,
i HAVE THE PROFILE LIST
Code:
ldapsearch -D cn=root -w root -p 389 mail=dgmp_ndl@bsnl.in
mail=dgmp_ndl@bsnl.in,o=Data Networks,o=Data Networks,o=Data Networks,o=Messagingdb,dc=bsnl,dc=in

I NEED TO SEPERATE ONLY THE MAIL ID
I m USING bash-2.05b$
Code:
ldapsearch -D cn=root -w root -p 389 mail=dgmp_ndl@bsnl.in |grep mail= |cut -d\  -f1
mail=dgmp_ndl@bsnl.in,o=Data

mail=dgmp_ndl@bsnl.in

BUT it is not displaying only the user id but o= field too

Last edited by Franklin52; 03-11-2010 at 04:40 AM.. Reason: Please use code tags!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies

2. Shell Programming and Scripting

Show if I have new mail in .profile ?

Is there any way to script it to tell me if I have new mail when I log-in? I'm using the bash shell. It's showing up now already but I want to put a clear in my .profile to clear the screen of the disclaimer I've seen 1000 times, I have a few echo's and a command to list the number of users... (3 Replies)
Discussion started by: eulogy1337
3 Replies

3. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

4. UNIX for Dummies Questions & Answers

extract first occurrence in a list

Hello everyone, I need to extract an item the first time it appears in a list: Input: human pool.1 121 4e-10 75 89 human pool.1 112 2e-08 75 78 human pool.1 154 1e-07 75 72 human pool.1 122 4e-06 75 68 human pool.1 111 3e-02 75 54 Horse pool.1 222 4e-10 82 90 Horse pool.1 333 3e-09... (5 Replies)
Discussion started by: viralnerd
5 Replies

5. Shell Programming and Scripting

Extract attachment from mail and place it in a directory

Hi, I have a requiremnent that i have to read a mail from a mail box and extract the attachment from that mail and place it in a directory. First of all is it possible in unix ? if so could you please help me out how it can be done Thanks in advance. (3 Replies)
Discussion started by: krishna_gnv
3 Replies

6. Shell Programming and Scripting

extract columns from file and send mail

Hi I have a file of the form name1,lastname1,email1@gmail.com,9.08243E+12,team1,role1,username1,password1 name2,lastname2,email2@gmail.com,9.08243E+11,team2,role2,username2,password2 I need to extract the email (column 3) and send a mail to each person, with their details ( specifically... (3 Replies)
Discussion started by: pkabali
3 Replies

7. Shell Programming and Scripting

Extract records from list

Hi Gents, I have a file 1 like this 1 1000 20 2 2000 30 3 1000 40 5 1000 50 And I have other file 1 like 2 1 I would like to get from the file 1 the complete line which are in file 2, the key to compare is the column 2 then output should be. 2 2000 30. I was trying to get it... (5 Replies)
Discussion started by: jiam912
5 Replies

8. Shell Programming and Scripting

sed to extract a multiline subject from a mail message

I'm trying to extract a subject from a mail message but my subject example has 2 lines. How can I manage to extract it and write a string at the end of it? Consider this example: From: test@domain.com Subject: Re: U =?ISO-8859-1?Q?qu=EA=3F!=3F!=3F!!_wtff_=E7=E3o_=ED=F3?= ... (6 Replies)
Discussion started by: twisterbr
6 Replies

9. Shell Programming and Scripting

Extract e-mail addresses on a page

Hi I normally ask questions on coding but I think there is a code that can do this. I have regular text throughout my file and I want to extract all e-mail addresses from it (rather than going and searching each one). E-mails all have @ so I assume there is a way. Thanks Phil (6 Replies)
Discussion started by: phil_heath
6 Replies
biff(1) 						      General Commands Manual							   biff(1)

NAME
biff - Notifies users when mail arrives SYNOPSIS
biff [y | n] DESCRIPTION
The biff command informs the system whether you want to be notified when mail arrives during the current terminal session. The following command enables notification: biff y The following command disables notification: biff n When mail notification is enabled, the From: and Subject: header lines and up to the first five lines of the message are displayed. The total display is 560 characters, or seven lines terminated by newline characters, whichever occurs first. The biff y command is often included in the $HOME/.login or $HOME/.profile file to be executed each time you log in. The biff command operates asynchronously. For synchronous notification, use the MAIL variable of sh or ksh, or the mail variable of csh. EXAMPLES
To display the current setting, enter: biff To be notified during the current terminal session whenever mail arrives, enter the following in your $HOME/.login or $HOME/.profile file: biff y FILES
Read by login shell (after login. User profile. SEE ALSO
Commands: comsat(8), csh(1), ksh(1), mail(1), mailx(1), Bourne Shell sh(1b), POSIX Shell sh(1p) biff(1)
All times are GMT -4. The time now is 09:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy