Sponsored Content
Top Forums Shell Programming and Scripting Iterative statement to cut values from a line Post 302287321 by joeyg on Friday 13th of February 2009 09:44:02 AM
Old 02-13-2009
Question Homework?

If you search this forum, you will probably find your answer.

But...
This 'smells' of a homework assignment.
Can you explain the real-life purpose to your request?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Code checking for all values in the same if statement.

I am trying to set up a variable based on the name of the file. function script_name { if then job_name='MONITOR' return job_name; elsif then job_name='VERSION' return job_name fi } for i in `ls *log` do script_name $i done. (4 Replies)
Discussion started by: oracle8
4 Replies

2. UNIX for Dummies Questions & Answers

to assign cut values to an array

i need to seperate values seperated by delimiters and assign it to an array.. can u plz help me on that. Variables = "asd,rgbh,(,rty,got,),sroe,9034," i need to assign the variables into arrays.. like.. var=asd var=rgbh.. and so on how do i do this. i need to reuse the values stored in... (6 Replies)
Discussion started by: Syms
6 Replies

3. Shell Programming and Scripting

Iterative operation

grep -o '\{1,3\}\.\{1,3\}\.\{1,3\}\.\{1,3\}' then how do i iterate the file names?? (19 Replies)
Discussion started by: ravis83
19 Replies

4. Shell Programming and Scripting

Need help with some iterative file processing

Gurus - Please help with this urgent situation. I have the following problem to solve using a shell script: 1. There are about 13 files named CONTAINER_1.lst, CONTAINER_2.lst, CONTAINER_3.lst .....CONTAINER_13.lst 2. Each of these files contain about 8 lines (in most cases) containing... (1 Reply)
Discussion started by: inditopgun
1 Replies

5. Shell Programming and Scripting

SH if statement using FLOAT values

Today I spent longer than I'd like to admit figuring out how to write a Bourne shell IF statement that tests a FLOAT value before executing a block of statements. Here's the solution I found, which invokes bc. Hope this will come in handy for someone: value = testval = if then body... (5 Replies)
Discussion started by: sjepsen
5 Replies

6. Slackware

How should I cut this line using cut and grep?

not sure how to do it. wan't to delete it using cut and grep ince i would use it in the shell. but how must the command be? grep "64.233.181.103 wwwGoogle.com" /etc/hosts | cut -d the delimeter is just a space. can you help meplease. :D (1 Reply)
Discussion started by: garfish
1 Replies

7. Emergency UNIX and Linux Support

Looping using cut statement

i want to create loop for below mentioned A1=`echo $obj1 | cut -d "," -f3` A2=`echo $obj1 | cut -d "," -f4` A3=`echo $obj1 | cut -d "," -f5` A4=`echo $obj1 | cut -d "," -f6` A5=`echo $obj1 | cut -d "," -f7` A6=`echo $obj1 | cut -d "," -f8` A7=`echo $obj1 | cut -d "," -f9` A8=`echo $obj1... (3 Replies)
Discussion started by: pasricha.kunal
3 Replies

8. Shell Programming and Scripting

iterative parsing

I have always struggled when parsing a file vertically vs. by line horizontally. Can't seem to get my head around the concept. Here again I need to convert vertical output to horizontal output. original output root@acuransx:bpplsched 2000-STAND3 -v -M acuransx -l <2>bpplsched: INITIATING:... (4 Replies)
Discussion started by: jouuu
4 Replies

9. UNIX for Dummies Questions & Answers

Help with cut statement

Hi i have the below content in a file and i am trying to cut 5.4 , but when i use the below cut command nothing comes up . I am not sure what i am doing wrong. I am new to unix. Please help me, thanks for the help in advance. $ cat pid.txt 5.4 21399 ./PreRating $ cut -d ' ' -f1 pid.txt ... (8 Replies)
Discussion started by: nick1982
8 Replies

10. UNIX for Dummies Questions & Answers

Cut from tables based on column values

Hello, I have a tab-delimited table that may contain 11,12 or 13 columns. Depending on the number of columns, I want to cut and get a sub table as shown below. However, the awk commands in the code seem to be an issue. What should I be doing differently? #cut columns 1-2,4-5,11 when 12 &... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies
dhcp6c.conf(5)							File Formats Manual						    dhcp6c.conf(5)

NAME
dhcp6c.conf - configuration file of the DHCPv6 client daemon, dhcp6c DESCRIPTION
dhcp6c.conf is a configuration file for dhcp6c (DHCPv6 client). dhcp6c is configured by the configuration information (such as rapid-commit, requesting temp-address, or prefix-delegation) in this file. dhcp6c.conf is an ASCII text file and lines that start with # are comments. STATEMENTS
interface <interface name> { [declarations] }; Write configurations for this interface in this statement. In [declarations], options can be specified. DECLARATIONS
send [dhcpoptions]; With this declaration, dhcp6c sends specified options. Currently rapid-commit is defined. send rapid-commit; This declaration enables dhcp6c to request the dhcp6s server to perform a Rapid Commit. request [dhcpoptions]; This declaration enables dhcp6c to request specified options. Currently temp-address, domain-name-servers, and prefix-delegation are defined. request domain-name-servers; The DHCPv6 mechanism provides a way to obtain configuration information such as a list of available DNS servers or NTP servers. This decla- ration enables dhcp6c to request a DNS server address from the DHCPv6 server. request domain-search-list; This declaration enables dhcp6c to request a domain search list which dhcp6c uses when resolving hostnames with DNS. request prefix-delegation; This declaration enables dhcp6c to request a Prefix Delegation to the DHCPv6 server. dhcp6c gets a prefix assignment from the DHCPv6 server. request temp-address; This declaration enables dhcp6c to request temporary addresses. dhcp6c requests Non-temporary Addresses as default. This option makes dhcp6c request Temporary Addresses. information-only; This declaration enables dhcp6c to request host configuration information from the DHCPv6 server. If dhcp6c doesn't need to be assigned any addresses, this option should be specified. default-information-refresh-time <information refresh time>; This declaration defines the default interval to refresh the host configuration information retrieved from a server. When a server offers an interval to dhcp6c, dhcp6c chooses the interval from server. If this declaration is not specified, the interval is 86400[sec] (24 hours). The minimum interval is 400[sec]. If you don't want to refresh the information, specify infinity as the interval. maximum-information-refresh-time <information refresh time>; This declaration defines the maximum interval to refresh the host configuration information retrieved from a server. When DHCPv6 server offers an interval which is bigger than this maximum interval, dhcp6c chooses this maximum interval. If this declaration is not specified, dhcp6c uses the interval which a server offered or the interval which is specified at default-information-refresh-time declaration. address { [<ipv6 address>/<prefix length>]; [prefer-life-time <preferred-lifetime>]; [valid-life-time <valid-lifetime>]; }; This declaration defines the dhcp6c client preferred IPv6 address, the preferred lifetime of the address, and the valid lifetime for this interface. prefix { [<ipv6 prefix>/<prefix length>]; [prefer-life-time <preferred-lifetime>]; [valid-life-time <valid-lifetime>]; }; This declaration defines the dhcp6c client acting as a requesting router for the preferred prefix, the prefix length, and the prefix's pre- ferred lifetime, and valid lifetime for this interface. prefer-life-time <preferred-lifetime>; This declaration sets the preferred lifetime (in seconds) of the address or prefix. This declaration is valid only in address or prefix declarations. valid-life-time <valid-lifetime>; This declaration sets the valid lifetime (in seconds) of the address or prefix. This declaration is valid only in address or prefix decla- rations. renew-time <renew-time>; This declaration specifies the Renew Time (in seconds) for this Identity Association (IA). Renew Time is a T1 value in an IA option. dhcp6c sets the Renew Time in IA options to the specified value. rebind-time <rebind-time>; This declaration specifies the Rebind Time (in seconds) for this IA. Rebind Time is T2 value in an IA option. dhcp6c sets the Rebind Time in IA options to the specified value. DHCPOPTIONS
rapid-commit If this option is used in a "send [dhcpoptions];" declaration, dhcp6c sends DHCPv6 messages with a Rapid Commit option. domain-name-servers If this option is used in a "request [dhcpoptions];" declaration, dhcp6c requests the DNS server address via the DHCPv6 mechanism. prefix-delegation If this option is used in a "request [dhcpoptions];" declaration, dhcp6c requests a Prefix Delegation to the DHCPv6 servers. prefix-delegation-interface <interface name> Specifies the name of the interface definition in radvd.conf that dhcp6c will write the 'prefix' declaration for. By default, dhcp6c will write a radvd.conf prefix declaration for the interface on which it receives the prefix delegation lease. EXAMPLES
This is a sample of the dhcp6c.conf file. interface eth0 { send rapid-commit; request prefix-delegation; request domain-name-servers; request temp-address; iaid 11111; address { 3ffe:10::10/64; prefer-life-time 6000; valid-life-time 8000; }; renew-time 11000; rebind-time 21000; }; SEE ALSO
dhcp6c(8) BUGS
Report bugs via http://fedorahosted.org/dhcpv6/ AUTHORS
See http://fedorahosted.org/dhcpv6/wiki/Authors dhcp6c.conf(5)
All times are GMT -4. The time now is 09:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy