Sponsored Content
Full Discussion: Capture IP Adress
Operating Systems AIX Capture IP Adress Post 97049 by DogDay on Wednesday 25th of January 2006 02:05:04 PM
Old 01-25-2006
Quote:
Originally Posted by pascalbout
thank you, but i need to capture the IP of the last login.
To explain, i try to automatically launch a program when a user connect (with .profile), and this program need the IP adress.
thank you
How about in your .profile you capture the IP with:

Code:
 last $LOGNAME -1|awk '{print $3}'

This will give you the IP address or hostname if their IP is in dns or the local hosts file.

Good luck
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

MAC-Adress

Hello I need to show my MAC-Adress on a Unix System, is there someone that know how? (2 Replies)
Discussion started by: nkochr
2 Replies

2. Solaris

IP-Adress

Hello together how can I find a ipadress from a login into remote system console? Thanks a lot Urs (1 Reply)
Discussion started by: MuellerUrs
1 Replies

3. HP-UX

Change IP Adress

I want change my IP address and hostname in my machine by use the console. Can any one tell me how can I execute that by command ? Thanks & Regards (1 Reply)
Discussion started by: magasem
1 Replies

4. OS X (Apple)

Obtain Mac Adress in crontab

hello, I need to obtain the Mac Adress and write him in a file. I'm trying to do this with a command in crontab, with ifconfig, but it's only possible do this if i disabled the password for run the command, but than i have security problems. I'm searching for a script (.sh) that allows me to... (5 Replies)
Discussion started by: Pedro Almeida
5 Replies

5. Shell Programming and Scripting

To find the IP adress in the log file

Hi, I need to find out the repeated IP address from the apache log file from my box. I did try to come out with the script, but I could not grep out the repeated Ip Address from the error_logs and need to redirect to a file. Can you guys please help me out of this problem. Thanks in... (9 Replies)
Discussion started by: gsiva
9 Replies

6. IP Networking

Changing the Ip adress permanently

well i'm trying to change the ip adress on an old alphaserver runing tru64 4.0F using the ifconfig hme0 IP_ADDRESS mask MASK broadcast BROADCAST and when i check it using ifconfig -a it shows the new ip and all is well but when the server is rebooted it reverts back to the old ip (3 Replies)
Discussion started by: randUSR()
3 Replies

7. Shell Programming and Scripting

Trying to get an IP adress from a file

This is probably a real n00b question but i`m not able to figure it out. I have a folder of configuration files that contain IP-adresses. The line i`m interested in looks like this: IP_ADDRESS="123.123.123.1123" Some have muliple ip adresses, so the line will look like : ... (5 Replies)
Discussion started by: DaneV
5 Replies

8. Shell Programming and Scripting

sort file with email adress

Hi All, I have a file which is "|" pipe delimited. The file has 3 fields. the last field contains email ids which has different host names. I want to sort the file based on host name, which is in 3rd filed and needs to create a file for each host. For example, if out of 1000 records, 10... (6 Replies)
Discussion started by: ace_friends22
6 Replies

9. IP Networking

adress traffic to tap0

Hello, I have a problem of routing traffic on two virtual interfaces I have created on my machine (CentOs6) By using tunctl I created two virtual interfaces tap1 and tap2 let s imagine I gave them two different address tap1: 10.1.1.1 net 255.255.255.0 tap2: 10.1.2.1 net 255.255.255.0 ... (0 Replies)
Discussion started by: nicandro
0 Replies

10. UNIX and Linux Applications

Postfix - If To: address is $x. Change From: adress to $y

Hello, hopefully somebody can give me a clue on how to do this. Right now I have emails coming from company1-alert@company1.com to distribution@ourcompany.com. I want to set up something in Postfix so that if the email is going to distribution@ourcompany.com, the From: address is... (2 Replies)
Discussion started by: TayKimchi
2 Replies
V4l(3pm)						User Contributed Perl Documentation						  V4l(3pm)

NAME
Video::Capture::V4l - Perl interface to the Video4linux framegrabber interface. SYNOPSIS
use Video::Capture::V4l; DESCRIPTION
Not documentation AGAIN! Please see the scripts grab, inexer or vbi that are packaged in the distribution and direct any question and feature requests (as well as bug reports) to the author. Exported constants The following hideous constants are defined in the "Video::Capture::V4l" package, but you rarely need to use them. AUDIO_BASS AUDIO_MUTABLE AUDIO_MUTE AUDIO_TREBLE AUDIO_VOLUME CAPTURE_EVEN CAPTURE_ODD MAX_FRAME MODE_AUTO MODE_NTSC MODE_PAL MODE_SECAM PALETTE_COMPONENT PALETTE_GREY PALETTE_HI240 PALETTE_PLANAR PALETTE_RAW PALETTE_RGB24 PALETTE_RGB32 PALETTE_RGB555 PALETTE_RGB565 PALETTE_UYVY PALETTE_YUV410P PALETTE_YUV411 PALETTE_YUV411P PALETTE_YUV420 PALETTE_YUV420P PALETTE_YUV422 PALETTE_YUV422P PALETTE_YUYV SOUND_LANG1 SOUND_LANG2 SOUND_MONO SOUND_STEREO TUNER_LOW TUNER_MBS_ON TUNER_NORM TUNER_NTSC TUNER_PAL TUNER_RDS_ON TUNER_SECAM TUNER_STEREO_ON TYPE_CAMERA TYPE_TV VC_AUDIO VC_TUNER TYPE_CAPTURE TYPE_CHROMAKEY TYPE_CLIPPING TYPE_FRAMERAM TYPE_MONOCHROME TYPE_OVERLAY TYPE_SCALES TYPE_SUBCAPTURE TYPE_TELETEXT TYPE_TUNER AUTHOR
Marc Lehmann <schmorp@schmorp.de> LICENSE
This module is available under GPL only (see the file COPYING for details), if you want an exception please contact the author, who might grant exceptions freely ;) SEE ALSO
perl(1). perl v5.14.2 2011-11-15 V4l(3pm)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy