Sponsored Content
Top Forums Shell Programming and Scripting Script to detect dynamic ip change and update to config file Post 302748639 by neutronscott on Wednesday 26th of December 2012 12:21:06 PM
Old 12-26-2012
What operating system/distribution? It'd be preferred to put it in your ppp-up script, or ifup scripts if available.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I wanted to update a script, more dynamic (just say no to hard coding)...

currently it has the following: bdumpN=`ll /home/apps/oracle/admin/DBprod/bdump/DBprod_j* | grep "$Cdate" | wc -l` If I pass the DBname, I would not have to hardcode it in the script... I can capture the database name by adding the following: DBname=$1 The problem is, I have been unable... (2 Replies)
Discussion started by: mr_manny
2 Replies

2. UNIX and Linux Applications

Autosys Config file update on a read-only filer

Hi To All Genius out there, We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access. Our Autosys environment is on a dual server... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies

3. Solaris

Autosys Config file update on a read-only filer

Hi To All Genius out there, We are running autosys application on solaris 10. In autosys we have a configuration file that contains an Autosys instance configuration data and is located on a NFS filer on which we have a read-only access. Our Autosys environment is on a dual server mode(Active... (0 Replies)
Discussion started by: whn_chips_r_dwn
0 Replies

4. Shell Programming and Scripting

AWK script to detect webpages from file

Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was: (Note: The symbol " was added to stop them being created into links) "www.google.com"... (1 Reply)
Discussion started by: ROFL
1 Replies

5. Shell Programming and Scripting

AWK script to detect webpages from file

Hi guys I'm very new to unix and I have to create an awk script that detects webpage addresses from a file/webpage and outputs how many times each webpage was detected.e.g. if my file was: www.google.com www.facebook.com www.google.com the output should be: www.google.com x2... (2 Replies)
Discussion started by: ROFL
2 Replies

6. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

7. Linux

issue on dynamic config script

I have one issue with my existing code.Actually i want to write parameter's at the end of the section not begin of section.please find my code snapshots... while read cfgfilename sectionname parameter do case "$cfgfilename" in cfgfilename) FILE=$HOME/config/$parameter unset... (1 Reply)
Discussion started by: suryanarayan
1 Replies

8. Windows & DOS: Issues & Discussions

script to change widows update permissions

I want to allow windows update when ordinary users are logged on, I'm pretty sure that adjusting the permissions registry entry HEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/WindowsUpdate to allow acces to all domins users does the trick. I already have a logon.bat that runs at... (0 Replies)
Discussion started by: barrydocks
0 Replies

9. Shell Programming and Scripting

ksh; Change file permissions, update file, change permissions back?

Hi, I am creating a ksh script to search for a string of text inside files within a directory tree. Some of these file are going to be read/execute only. I know to use chmod to change the permissions of the file, but I want to preserve the original permissions after writing to the file. How can I... (3 Replies)
Discussion started by: right_coaster
3 Replies

10. Shell Programming and Scripting

Update config file using shell script in Solaris 5.10

hi I need to update the value in config.txt value using shell script example: lets say a value in config.txt file is as SEQUENCE=1 after some iteration as the loop ends , the SEQUENCE should get update in the config.txt file with a new value of SEQUENCE=2. also , can anyone please help me... (7 Replies)
Discussion started by: ravidwivedi2288
7 Replies
IP-LINK(8)							       Linux								IP-LINK(8)

NAME
ip-link - network device configuration SYNOPSIS
ip [ OPTIONS ] link { COMMAND | help } OPTIONS := { -V[ersion] | -s[tatistics] | -r[esolve] | -f[amily] { inet | inet6 | ipx | dnet | link } | -o[neline] } ip link add [ link DEVICE ] [ name ] NAME [ txqueuelen PACKETS ] [ address LLADDR ] [ broadcast LLADDR ] [ mtu MTU ] type TYPE [ ARGS ] TYPE := [ vlan | veth | vcan | dummy | ifb | macvlan | can | bridge ] ip link delete DEVICE type TYPE [ ARGS ] ip link set { DEVICE | group GROUP } { up | down | arp { on | off } | promisc { on | off } | allmulticast { on | off } | dynamic { on | off } | multicast { on | off } | txqueuelen PACKETS | name NEWNAME | address LLADDR | broadcast LLADDR | mtu MTU | netns PID | netns NETNSNAME | alias NAME | vf NUM [ mac LLADDR ] [ vlan VLANID [ qos VLAN-QOS ] ] [ rate TXRATE ] [ spoofchk { on | off } ] | master DEVICE nomaster } ip link show [ DEVICE | group GROUP ] DESCRIPTION
ip link add - add virtual link link DEVICE specifies the physical device to act operate on. NAME specifies the name of the new virtual device. TYPE specifies the type of the new device. Link types: vlan - 802.1q tagged virtual LAN interface veth - Virtual ethernet interface vcan - Virtual Local CAN interface dummy - Dummy network interface ifb - Intermediate Functional Block device macvlan - virtual interface base on link layer address (MAC) can - Controller Area Network interface bridge - Ethernet Bridge device ip link delete - delete virtual link DEVICE specifies the virtual device to act operate on. TYPE specifies the type of the device. dev DEVICE specifies the physical device to act operate on. ip link set - change device attributes dev DEVICE DEVICE specifies network device to operate on. When configuring SR-IOV Virtual Fuction (VF) devices, this keyword should specify the associated Physical Function (PF) device. group GROUP GROUP has a dual role: If both group and dev are present, then move the device to the specified group. If only a group is speci- fied, then the command operates on all devices in that group. up and down change the state of the device to UP or DOWN. arp on or arp off change the NOARP flag on the device. multicast on or multicast off change the MULTICAST flag on the device. dynamic on or dynamic off change the DYNAMIC flag on the device. name NAME change the name of the device. This operation is not recommended if the device is running or has some addresses already configured. txqueuelen NUMBER txqlen NUMBER change the transmit queue length of the device. mtu NUMBER change the MTU of the device. address LLADDRESS change the station address of the interface. broadcast LLADDRESS brd LLADDRESS peer LLADDRESS change the link layer broadcast address or the peer address when the interface is POINTOPOINT. netns PID move the device to the network namespace associated with the process PID. netns NETNSNAME move the device to the network namespace associated with name NETNSNAME. alias NAME give the device a symbolic name for easy reference. group GROUP specify the group the device belongs to. The available groups are listed in file /etc/iproute2/group. vf NUM specify a Virtual Function device to be configured. The associated PF device must be specified using the dev parameter. mac LLADDRESS - change the station address for the specified VF. The vf parameter must be specified. vlan VLANID - change the assigned VLAN for the specified VF. When specified, all traffic sent from the VF will be tagged with the specified VLAN ID. Incoming traffic will be filtered for the specified VLAN ID, and will have all VLAN tags stripped before being passed to the VF. Setting this parameter to 0 disables VLAN tagging and filtering. The vf parameter must be specified. qos VLAN-QOS - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN tags transmitted by the VF will include the specified priority bits in the VLAN tag. If not specified, the value is assumed to be 0. Both the vf and vlan parameters must be specified. Setting both vlan and qos as 0 disables VLAN tagging and filtering for the VF. rate TXRATE - change the allowed transmit bandwidth, in Mbps, for the specified VF. Setting this parameter to 0 disables rate limiting. The vf parameter must be specified. spoofchk on|off - turn packet spoof checking on or off for the specified VF. master DEVICE set master device of the device (enslave device). nomaster unset master device of the device (release device). Warning: If multiple parameter changes are requested, ip aborts immediately after any of the changes have failed. This is the only case when ip can move the system to an unpredictable state. The solution is to avoid changing several parameters with one ip link set call. ip link show - display device attributes dev NAME (default) NAME specifies the network device to show. If this argument is omitted all devices in the default group are listed. group GROUP GROUP specifies what group of devices to show. up only display running interfaces. EXAMPLES
ip link show Shows the state of all network interfaces on the system. ip link set dev ppp0 mtu 1400 Change the MTU the ppp0 device. ip link add link eth0 name eth0.10 type vlan id 10 Creates a new vlan device eth0.10 on device eth0. ip link delete dev eth0.10 Removes vlan device. SEE ALSO
ip(8) AUTHOR
Original Manpage by Michail Litvak <mci@owl.openwall.com> iproute2 20 Dec 2011 IP-LINK(8)
All times are GMT -4. The time now is 09:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy