10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. IP Networking
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
4. Shell Programming and Scripting
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
5. OS X (Apple)
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
6. Shell Programming and Scripting
Hi all Unix Gurus!
Since hours (even days :-)) I'm trying to find the correct pattern to search for IP addesses in text files.
The pattern to find a IP address itself is not too difficult:
'((||1{2}|2|2{2})\.){3,}(||1{2}|2|2{2})'
BUT, of course the above pattern is also matching lines like... (9 Replies)
Discussion started by: desertchannel
9 Replies
7. HP-UX
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
8. AIX
hello
I need for a script to capture the ip address from the connected user.
I have 5 logical partitions.
With "who", i have the ip adress, but only for 2 servers.
Do you know another command to know the ip address of connected clients ?
thank you (14 Replies)
Discussion started by: pascalbout
14 Replies
9. Solaris
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
10. UNIX for Dummies Questions & Answers
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
IFSCHEME(8) Commands IFSCHEME(8)
NAME
ifscheme - scheme control for network interfaces
SYNOPSIS
ifscheme [-v] [[-s] newscheme]
mapping <interface> script ifscheme-mapping
DESCRIPTION
ifscheme allows you to change network configuraton schemes or query the current scheme. It integrates with the ifup(8) command and inter-
faces(5). For example, you might use this program to configure a "home" scheme and a "work" scheme for a network device on a laptop. When
you move between home and work, a simple command can reconfigure your networking.
If you run the program with no parameters, it will tell what the current network scheme is.
The ifscheme-mapping utility is used to tell the ifup and ifdown utilities about the current scheme.
OPTIONS
-v
--verbose
Run in verbose mode. This is passed in to the ifup and ifdown programs as well.
-l
--list list all schemes available/defined in /etc/network/interfaces.
newscheme
-s newscheme
--scheme newscheme
Change to a new network configuration scheme. When the scheme is changed, network interfaces that were using the old scheme will be
taken down and brought back up to use the new configuration scheme. -s or --scheme are mandatory if newscheme begins with a -.
CONFIGURATION
To make the program do anything useful when a scheme is selected, you must edit /etc/network/interfaces to add a mapping for the interface
(or interfaces) that can be controlled on a per-scheme basis. Suppose you want to control eth0 in this way. You might have an existing eth0
configuraton in there, such as:
auto eth0
iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.1
To change this so you can chose between static routing and dhcp, replace it with the following (it helps to ifdown the interface first).
auto eth0
mapping eth0
script ifscheme-mapping
iface eth0-home inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.1
iface eth0-work inet dhcp
Now if you run "ifscheme home" and ifup the interface, you'll get the eth0-home configuration stanza. If you run "ifscheme work", it will
be changed to the eth0-work stanza. You can add additional stanzas as desired, but the label must always be of the form <hardware inter-
face>-<scheme name>.
If you have a second interface (perhaps a wireless network card on eth1), you can duplicate the above for that interface, changing the eth0
and the configuration details as appropriate, but remember to add an iface stanza for every scheme name for the second interface.
FILES
/etc/network/interfaces
the interfaces definition file
/etc/network/run/scheme
the current scheme
/etc/network/run/ifstate
a record of the current state of the interfaces, managed by ifup and ifdown
BUGS
All schemed interfaces will have the same scheme.
Any schemed interface which does not have an entry for the current scheme and is not configured when the scheme is changed will not be suc-
cessfully configured when it is brought up.
SEE ALSO
interfaces(5) ifup(8) ifdown(8)
DISTRIBUTION
Redistribution is subject to the GNU public license.
AUTHORS
Joey Hess <joey@kitenet.net>, Peter Wilson <pwilson@cs.hmc.edu>
IFSCHEME(8)