- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- who can show my one simple script to get my curren...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2004 03:08 PM
тАО09-02-2004 03:08 PM
Re: who can show my one simple script to get my current login IP?
echo $SSH_CLIENT | cut -d " " -f 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2004 03:45 PM
тАО09-02-2004 03:45 PM
Re: who can show my one simple script to get my current login IP?
$ uname -a
Linux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-02-2004 03:46 PM
тАО09-02-2004 03:46 PM
Re: who can show my one simple script to get my current login IP?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2004 01:18 AM
тАО09-03-2004 01:18 AM
Re: who can show my one simple script to get my current login IP?
I have the following in my .bash_profile. This returns hostname:0.0.
predis=`/usr/bin/who -m --lookup | /bin/grep "(" | /bin/sed "s/^.*(\(.*\))/\1:0.0/" | /bin/cut -d: -f1,2`
if [ "$predis" != "" ]; then
echo "Setting DISPLAY to $predis"
DISPLAY=$predis
export DISPLAY
fi
If you want it to return IP you can try adding something like this:
ipa=`/usr/bin/host $predis /bin/cut -d" " -f4`
and remove the :0.0 part at the end...
HTH,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2004 08:56 PM
тАО09-05-2004 08:56 PM
Re: who can show my one simple script to get my current login IP?
ciao,
Claudio
- « Previous
-
- 1
- 2
- Next »