Sponsored Content
Operating Systems SCO Grep to ignore suffix & find end of line Post 302963034 by wbport on Tuesday 22nd of December 2015 02:54:41 PM
Old 12-22-2015
Quote:
Originally Posted by MadeInGermany
Using a $ anchor you can address all trailing characters
Many thanks, that did the trick!

---------- Post updated at 01:54 PM ---------- Previous update was at 01:22 PM ----------

On second thought, almost. If there is a hyphen anywhere later on the line, the line is thrown out. The first line of this code is OK, the second isn't, and the third is ok.
Code:
    03  AAA    PIC 999V99.
             MULTIPLY AAA BY 100 GIVING OUT-AMT.
            ADD XYZ TO AAA

RudiC: Your suggestion works, many thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

a better way to grep until end of error message, although most seem to be 1 or 2 line

My file creates an output log after which includes a few sql queries. I segregate them into warnings and errors and then get a total count. The errors' and warnings' lines always start with SQL{4} followed by the details of the error. This is what im doing as o now... errors=`grep -A 1 -E... (11 Replies)
Discussion started by: VGR
11 Replies

2. Shell Programming and Scripting

Find a string using grep & print the line above or below that.

Hi All, Please tell me how can I Find a string using grep & print the line above or below that in solaris? Please share as I am unable to use grep -A or grep -B as it is not working on Solaris. (10 Replies)
Discussion started by: Zaib
10 Replies

3. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

4. Shell Programming and Scripting

find a certain line and append text to the end of the line

After I create printer queues in AIX, I have to append a filter file location within that printers custom file. within lets say test_queue.txt I need to find the row that starts with :699 and then I need to append on the end the string /usr/local/bin/k_portrait.sh. Now I've gotten the sed... (2 Replies)
Discussion started by: peachclift
2 Replies

5. Shell Programming and Scripting

Using Grep & find & while read line in a script

Hello people! I would like to create one script following this stage I have one directory with 100 files File001 File002 ... File100 (This is the format of content of the 100 files) 2012/03/10 12:56:50:221875936 1292800448912 12345 0x00 0x04 0 then I have one... (0 Replies)
Discussion started by: Abv_mx81
0 Replies

6. Shell Programming and Scripting

How to ignore comments at the end of the each line?

Hi All, I am reading the host file by ignoring the comments and write it to the other file. I am reading with regular expression for IP address. grep -E '^{1,3}\.{1,3}\.{1,3}\.{1,3}' $inputFile | awk '{for(i=2;i<=NF;i++)print $1,$i}' > $DR_HOME/OS/temp After that am reading each host... (4 Replies)
Discussion started by: sharsour
4 Replies

7. Shell Programming and Scripting

Grep command to ignore line starting with hyphen

Hi, I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file. for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'` do . . done How... (4 Replies)
Discussion started by: Srinraj Rao
4 Replies

8. Shell Programming and Scripting

Need to add a numeric & special char to end of the first line

Need to add a numeric & special char to end of the first line Existing file: 12-11-16|11 2016 Jan 12:34:55|03:55| 13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55| 14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55| 15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies

9. Shell Programming and Scripting

Grep after - til the end of the line

Hi, i need to cat a file after # till the end of the file usually ill do cat /etc/somthing | grep -A999999 # but its not that professional thanks edit by bakunin: please use CODE-tags (or ICODE-tags) for code and data. Thank you. (9 Replies)
Discussion started by: batchenr
9 Replies

10. Shell Programming and Scripting

Script using awk to find and replace a line, how to ignore comment lines

Hello, I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
mipd.conf(4)						     Kernel Interfaces Manual						      mipd.conf(4)

NAME
mipd.conf - Mobile IPv4 Mobility Agent daemon configuration file SYNOPSIS
(default configuration file) DESCRIPTION
When invoked, the IPv4 Mobility Agent daemon, reads its configuration information from (by default). The IPv4 Mobility Agent daemon can act as a Home Agent (HA) or a Foreign Agent (FA). can be configured to act as combined Home Agent and Foreign Agent only if it is not operating in AAA mode (see below). The content of this file will determine what kind of Mobility Agent functions the daemon will perform. Syntax The basic structure of the configuration file consists of sections, each delimited by curly braces in the form of . . . Each section generally contains a series of lines; each line providing the value for one configuration option in the form of For most part, white space is ignored and '#' comments out the rest of the line. Some labels require multiple values be provided on a sin- gle line, and these values must typically be separated by spaces. The set of legal values depends greatly on which label is being assigned. This configuration file consists of three mandatory sections in the following order: and All three sections are required although they may be empty depending on the optional fields entered and the mobility services (eg. Home Agent or Foreign Agent) being configured for the Mobile IP Agent daemon. The main Section The section must always come first. Fields within the section are: This field is optional and is used by Foreign Agent only. It indicates how long (in seconds) to keep a registration Request for Foreign Agent that hasn't had a matching Regis- tration Reply yet. The default vault for this field is 5.0 seconds. This field accepts floating number. This field is optional and is used by both Home Agent and Foreign Agent. It indicates the value of the ICMP code field of the router advertisement inside the Mobile IP Agent Advertisement message. There are two possible value for this field: This mobility agent handles common traffic -- that is, it acts as a router for IP datagrams not necessarily related to mobile nodes. This mobility agent does not route common traffic other than IP datagrams received from a registered mobile node. The default value for this field is 16. WARNING: Some Mobile Node implementations are known to be confused by advertisements with an ICMP code of 0. This field is required for to operate in AAA mode. It provides the Fully Qualified Domain Name of the host on which is started. This name is used to build the AAA identity for This field is required for to operate in AAA mode. It provides the Fully Qualified Domain Name of the AAA server that serves This name should be resolved via a DNS lookup. Note: The and fields are required for to operate in AAA mode. If one of these fields is omitted or if both the fields are omitted, the daemon would operate in non-AAA mode. This field is optional. It specified the port number on which the AAA server listens for connections. The default value is 1812. The keys Section The section contains a list of authentication keys between two mobility entities. Currently, only Mobile Node-Home Agent and Correspondent Node-Home Agent keys are supported. Hence, this section is required for a HA configuration and is empty for a Foreign Agent only configu- ration. Each entry in this section is entered in the following format: These field are: IP_Address is the IP address of either a Mobile Node or a Correspondent Node. spi is the Security Parameter Index (SPI) value, a 32-bit integer in the range 256 - 2147483647. The SPI does not have to be unique on the Home Agent and must match the SPI configured on the Mobile Node or Correspondent Node. algo is the hashing algorithm used for this security association. Accepted algorithms are hmac-md5 and md5. tstamp indicates that timestamps are used for replay protection. key is the authentication key, a total of 16 bytes. Each byte is entered as two hex digits. Each byte is separated by a space. WARNING: Do not enter more than one key entry for each Mobile Node or Correspondent Node. The ether Section The section contains network interface parameters for Mobile IP. If you have more than one network interface in your machine, you must duplicate this section and fill out one for each interface that you intend to provide Mobile IP service(s). It is incorrect to specify more than one interface name in this section. Fields within the section are: This field is required and contains the name of the network interface that provides mobility service(s). This field is required and indicates the mobility service(s) this interface will offer. It will affect the setting of the H and F flags within the Agent Advertisement Exten- sion. to offer Home Agent mobility service to offer Foreign Agent mobility service to offer both Home Agent and Foreign Agent mobility services. Note that this is not permitted when is configured to act in AAA-mode (see for more info). This field is required and contains the primary address of the interface. This address serves two purposes: 1) As the Home Agent address (if Home Agent service is offered) 2) As the source address that Agent Advertisement messages will have on both the Home Agent and Foreign Agent. If Home Agent service is provided on this interface, Mobile Nodes with their home network on this interface's subnet should be configured to use this interface's primary address as their Home Agent address. This field is required and contains the netmask associated with the primary-addr field. This field is required and contains the address that Agent Advertisement messages is broadcasted/multicasted to. It must be either 255.255.255.255 (the limited-broadcast address) or 225.0.0.1 (multicast address for the all systems on this link). This field is optional and indicates the interval (in seconds) between two consecutive Agent Advertisement messages. It SHOULD be no longer than 1/3 of ICMP Router Advertisement Lifetime below. The default value of this field is 1 second. This field accepts floating point number. This field is optional and contains the Lifetime value (in seconds) within the ICMP Router Advertisement. The default value for this field is 1800 seconds (30 minutes) per RFC 1256. This field is optional and contains the maximum Registration Lifetime (in seconds) allowed within the Mobility Agent Advertisement Extension of a Registration Request. Registrations requesting a longer lifetime than this value will be rejected by the Foreign Agent. The default value of this field is 300 seconds (5 minutes). Note: max-reg-lifetime has no relation with the router-lifetime. This field is optional and contains the Router Address and its associated Preference Level within the ICMP Router Advertisement portion of the Agent Advertisement message. The pref- erence_level must be a number within the range 1 to Number_of_Routers. Higher preference level means more preferable. Repeat this field for as many routers as you want to advertise. A maximum of eight routers can be entered. This field is related with the router field above and contains the netmasks of the corresponding routers advertised above. Hence, make sure that you repeat this field for as many routers as you advertised above. The router netmask is used by the Mobility Agent to compute the Prefix-Lengths within the Prefix-Length Extension inside Agent Advertisement message. The Prefix-Lengths may be used by some Mobile Nodes as part of their move detection algorithm. WARNING: RFC 3344 requires that the number of router netmasks be the same as the number of routers. Some Mobile Nodes are known to re-register constantly if the numbers are not matched. This field is related to the above service field and contains the Care-of Address within the Agent Advertisement Extension. This field is required if you have configured Foreign Agent service on this interface. Note: The Care-of Address is not necessarily the same as the primary address of the interface. In fact, if the machine has multiple interfaces, usually the Care-of Address should be the primary address of the fastest/best connected interface. You can provide multiple Care-of Addresses by repeating this field. A maximum of eight Care-of Addresses can be entered. This field is optional and can be used to configure a pool of addresses from which this Home Agent (if configured) can allocate home addresses. The field can be repeated as many times as needed. IP_address is the first address in the pool, and the pool would consist of num_addresses number of IP addresses starting from IP_address. The default value for num_addresses is 1. This field is optional and can be used to specify the size of the challenge window maintained by this Foreign Agent (if configured). The maximum size accepted is 8. The default value is set to 2. FILES
default configuration file AUTHOR
was originally developed by Carnegie Mellon University with changes made by Hewlett-Packard to port to HP-UX. SEE ALSO
mipadmin(1M), mipconfig(1M), mipd.conf(4). RFC 3344 IP mobility Support for IPv4 RFC 1256 ICMP Router Discovery Messages RFC 1853 IP in IP Tunneling RFC 2003 IP Encapsulation within IP mipd.conf(4)
All times are GMT -4. The time now is 05:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy