Sponsored Content
Full Discussion: AWK syntax question
Top Forums UNIX for Dummies Questions & Answers AWK syntax question Post 302251845 by Leo_NN on Tuesday 28th of October 2008 08:59:06 AM
Old 10-28-2008
object_list="CUSTOMER ADDRESS TELEPHONE"

Here I wanted to check if $3 is in the object_list, not equal, but part of it.
For instance if $3="CUSTOMER" - OK.
So I need something like IN or *$3* syntax, I think.

thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk syntax question

Hi there could someone explain what is happening in the following function/statement for me, im just a little confused code = 'BEGIN{FS=","} { printf ("%-11s,%s%s%s,%07.2f,%14s,%-3s\n",$1,substr($2,9,2),substr($2,6,2),substr($ 2,3,2),$9,$10,$12) } this function is called later in the... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

2. Shell Programming and Scripting

yet another awk field syntax question

I am trying to print the remaing fields and field numbers beginning with a field 'xyz' #cat abc test1:test2:xyz:test3:test4:test5 #cat def test1:test2:test3:xyz:test4:test5 desired output is to be able to print NF and any trailing fields separated by':' test3 3 or test4 3 or test5... (4 Replies)
Discussion started by: prkfriryce
4 Replies

3. Shell Programming and Scripting

awk syntax question

Hi I use awk command to delete the first blanc line of a file: awk '/^$/ && !f{f=1;next}1' infile > outfile can somebody please explain me what the last "1'" in !f{f=1;next}1' stands for... Thansk a lot -A (3 Replies)
Discussion started by: aoussenko
3 Replies

4. Shell Programming and Scripting

OR operator syntax question in AWK script

Hi guys, I confused about syntax used in OR script as follow: I have this sample file separated by "|" containing: January|Month No. 1 February|Month No. 2 March|Month No. 3 April|Month No. 4 May|Month No. 5 June|Month No. 6 July|Month No. 7 August|Month No. 8 September|Month No. 9... (11 Replies)
Discussion started by: cgkmal
11 Replies

5. Shell Programming and Scripting

syntax question in regards to nested awk statements

Hello all, I am writing up an input file and I was hoping I could get some guidance as to how to best consolidate these 2 awk statements for 1 while loop. Here's my input file # cat databases.lst #NOTE: These entries are delimited by tabs "\t" #oracleSID name/pass # db11 ... (2 Replies)
Discussion started by: Keepcase
2 Replies

6. UNIX for Advanced & Expert Users

SNMP syntax question

Hello, I need to create an snmp.comf file that defines 2 IPs to the same community string. Do I need to have 2 community strings with the same name and diff't IPs? Or should I have 1 string and list the IPs? (comma seperated?) Example: rocommunity EC_8000_RO arguments EC_8000_RO... (2 Replies)
Discussion started by: felbvts
2 Replies

7. Shell Programming and Scripting

tar -C syntax question

I am writing a perl script to tar multiple files (in unix) from a given directory to a given output directory. I do NOT want the file path included in the tar, so I've flagged the -C option. Example: tar -cvf tar/1.tar -C htmp/source/ 1-1-1.xml However, I need to do this for a number of target... (3 Replies)
Discussion started by: michanjohns
3 Replies

8. Shell Programming and Scripting

Question about syntax error

first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe s = `expr ls -s Documents | grep Music | awk '{ print $1 }' ` t = `expr $t + $s` it give syntax error s not found t not found lol... any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies

9. Programming

Perl syntax question

Hallo everybody, I have a following problem - I'm doing a map funciont to fill in a HTML table and I want to use some radiobutton groups. Unfortunatelly, they are grouped by names, so I have to add some "counter" that will divide one row from another, and I'm using CGI.pm for generating the... (3 Replies)
Discussion started by: duskos
3 Replies

10. Shell Programming and Scripting

Question regarding quotation syntax

Hey guys, my first post on UNIX Forums(much overdue IMO)! I've got this bit of code that doesn't seem to be working correctly for an Android app I'm working on: "screen -S gmod1 -p 0 -X stuff " & "" & command.text & "`echo -ne '\015'`""" Basically it types command.text(variable determined... (4 Replies)
Discussion started by: stingwraith
4 Replies
dhcp6r(8)						      System Manager's Manual							 dhcp6r(8)

NAME
dhcp6r - DHCPv6 relay agent SYNOPSIS
dhcp6r [ -d ] [ client-options ] [ server-options ] DESCRIPTION
dhcp6r acts as DHCPv6 relay agent forwarding DHCPv6 messages from clients to servers and vice versa. DHCPv6 messages from clients are received at UDP port 547, they are forwarded to one or more DHCPv6 servers by multicast and/or unicast. DHCPv6 messages from servers to clients are also received at UDP port 547 and forwarded by unicast only. DHCPv6 messages received by multicast at a certain IPv6 interface are never forwarded by multicast to the same interface. If no options are present, the relay agent receives messages by unicast and multicast at all IPv6 interfaces, and all messages are for- warded to all IPv6 interfaces by multicast with the exception mentioned in the previous paragraph. If one or more client-options are present, then messages are only received as specified by the client options. If one or more server- options are present, then messages are only forwarded as specified by the server options. CLIENT-OPTIONS If no client-options are present, the relay receives messages by multicast and unicast at all IPv6 interfaces. If one or more client options are present, then messages are only received as specified by the client-options. In any case, the relay receives client messages by unicast. -cu This option can be used to configure the client such that it receives messages from clients or other relay agents by unicast only. It does not have any effect if a -cm option is present. -cm INTERFACE Accept client messages multicasted at IPv6 interface INTERFACE. The others are receiving only unicast messages. For specifying a set of interfaces, an instance of this option is required for each interface. SERVER-OPTIONS If no server-options are present, the relay forwards messages received from clients by multicast and unicast to all IPv6 interfaces, except the one, which the packet was received on. If one or more server-options are present, then messages are forwarded as specified by the server-options. -sm INTERFACE Forward all received client messages by multicast at IPv6 interface INTERFACE. For specifying a set of interfaces, an instance of this option is required for each interface. -su ADDRESS Forward all received client messages by unicast to the IPv6 address ADDRESS. For specifying a set of addresses, an instance of this option is required for each address. -sf INTERFACE+ADDRESS Forward all received client messages by unicast to the IPv6 address ADDRESS through the IPv6 interface INTERFACE. For specifying a set of combinations of interfaces and addresses, an instance of this option is required for each combination. The -sm, -su, and -sf options can be combined in arbitrary ways. OTHER OPTIONS
-d If this option is not present, dhcp6r will dump logging information into the file /var/log/dhcp6r.log. If the option is present, logging information will be sent to stderr instead. EXAMPLES
The following examples are shown as given to the shell: dhcp6r Receive messages from clients at all IPv6 interfaces by multicast and by unicast, and forward them to all (other) IPv6 interfaces by multicast. dhcp6r -cu Receive messages from clients by unicast only, and forward them to all (other) IPv6 interfaces by multicast. dhcp6r -cm eth0 -cm eth2 Receive messages from clients at interfaces eth0 and eth2 by multicast and by unicast, and forward them to all IPv6 interfaces by multicast (except the one at which the message was received by multicast). dhcp6r -cm eth0 -cm eth2 -sm eth1 Receive messages from clients at interfaces eth0 and eth2 by multicast and by unicast, and forward them to interfaces eth1 by multi- cast. dhcp6r -su fec0::204:ce33:763f:b34 -su fec0::504:ff33:73f:c557 Receive messages from clients at all IPv6 interfaces by multicast and by unicast, and forward a copy of them to each of the speci- fied addresses. dhcp6r -sm eth1 -su fec0::204:ce33:763f:b34 Receive messages from clients at all IPv6 interfaces by multicast and by unicast, and forward them to interface eth1 by multicast and to the specified unicast address. dhcp6r -sm eth1 -sf eth0+fec0::504:ff33:73f:c557 Receive messages from clients at all IPv6 interfaces by multicast and by unicast, and forward them to interface eth1 by multicast and to the specified unicast address. For the unicast address it is enforced that the message will be sent through interface eth0. NOTES
For proper operation of dhcp6r, the host must have at least one global/site scope address assigned to each interface. FILES
/var/log/dhcv6r.log /var/run/dhcpv6/dhcp6r.pid BUGS
Report bugs via http://fedorahosted.org/dhcpv6/ AUTHORS
See http://fedorahosted.org/dhcpv6/wiki/Authors dhcp6r(8)
All times are GMT -4. The time now is 07:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy