Sponsored Content
Top Forums Shell Programming and Scripting Assistance required with awk and regular expressions Post 302899405 by jimbojames on Monday 28th of April 2014 09:03:45 PM
Old 04-28-2014
Assistance required with awk and regular expressions

Hello there,

I am trying to get my head around the section below of a script we use that incorporates AWK and Regular Expressions.

Code:
{ match($0,"The broker[^.][^.]*[.]");print $1,$2,$3 ":", substr($0, RSTART,RLENGTH)}

I have a basic understanding of how match works, what I am struggling with is the ($0,"The broker[^.][^.]*[.]") section.

What is $0, and what does [^.][^.]*[.] signify?

Any help would be greatly appreciated!
 

10 More Discussions You Might Find Interesting

1. Programming

regular expressions in c++

How do I use the regular expressions in c++? (2 Replies)
Discussion started by: szzz
2 Replies

2. Shell Programming and Scripting

regular expressions

Hello, Let say I have a string with content "Free 100%". How can extract only "100" using ksh? I would this machanism to work if instead of "100" there is any kind of combination of numbers(ex. "32", "1238", "1"). I want to get only the digits. I have written something like this: ... (4 Replies)
Discussion started by: whatever
4 Replies

3. UNIX for Advanced & Expert Users

Regular Expressions

Hi, below is a piece of code written by my predecessor at work. I'm kind of a newbie and am trying to figure out all the regular expressions in this piece of code. It is really a tough time for me to figure out all the regular expressions. Please shed some light on the regular expressions... (3 Replies)
Discussion started by: ramky79
3 Replies

4. Shell Programming and Scripting

Awk regular expressions

Hi Experts, Can you please help me out for the below scenario, I have a variable length file with the fixed number of columns, in which the fields are delimited by pipe symbol (|). From that file I have to extract the lines which has the following scenario, The field1 in a... (1 Reply)
Discussion started by: chella
1 Replies

5. Shell Programming and Scripting

Handling regular expressions in awk

Script is: accept filename as argument(also handle CTRL+C).to check whether th file exist in the current directory,it it then using awk find the employees who are either born in 1990 or drawing a salary greater than 25000. In my database file 1st field is of id ,2nd field is name,5th field is of... (5 Replies)
Discussion started by: Priyanka Bhati
5 Replies

6. Shell Programming and Scripting

Test Regular Expressions on Arrays in Awk

How would I test for a suffix on an element in an array? e.g. testing for /$html/ of an element array (4 Replies)
Discussion started by: ROFL
4 Replies

7. Shell Programming and Scripting

Help with regular expressions

I have a file that I'm trying to find all the cases of phone number extensions and deleting them. So input file looks like: abc x93825 def 13234 x52673 hello output looks like: abc def 13234 hello Basically delete lines that have 5 numbers following "x". I tried: x\(4) but it... (7 Replies)
Discussion started by: pxalpine
7 Replies

8. Homework & Coursework Questions

Grep expressions homework, need assistance

Please dont delete, im listing my assignment and will be editing as i work on it. I am NOT looking for answers but help in understanding how to use grep 1. The problem statement, all variables and given/known data: For each question, list the command lines used in addition to any other details... (3 Replies)
Discussion started by: alindner
3 Replies

9. Shell Programming and Scripting

awk or sed or python for regular expressions ?

Linux 6.X environments (RHEL, Oracle Linux ) I could write basic shell scripts in bash. In my spare time, I was planning to learn awk or sed to deal with regular expression tasks I have to deal with. But, I gather that python is gaining popularity these days and I came to know that python has a... (5 Replies)
Discussion started by: John K
5 Replies

10. Shell Programming and Scripting

Regular expressions

I need to pick a part of string lets stay started with specific character and end with specific character to replace using sed command the line is like this:my audio book 71-skhdfon1dufgjhgf8.wav' I want to move the characters beginning with - end before. I have different files with random... (2 Replies)
Discussion started by: XP_2600
2 Replies
imqbrokerd(1M)						  System Administration Commands					    imqbrokerd(1M)

NAME
imqbrokerd - start a Message Queue broker instance SYNOPSIS
/usr/bin/imqbrokerd [option...] /usr/bin/imqbrokerd -h DESCRIPTION
imqbrokerd starts an instance of the Message Queue broker. The Message Queue broker is the main component of a Message Queue message server. The broker performs reliable delivery of messages to and from Java Message Service (JMS) clients. imqbrokerd uses command line options to specify broker configuration properties. OPTIONS
The following options are supported: -backup fileName Back up a Master Broker's configuration change record to fileName. This option only applies to broker clusters. -cluster brokerList Specify the list of broker instances which are connected in a cluster. This list is merged with the list in the imq.cluster.brokerlist property. This option only applies to broker clusters. brokerList is a comma-separated list of broker instances, each specified by hostName:port (the host on which the broker instance is running and the port number it is using) If you don't specify a value for hostName, localhost is used. If you don't specify a value for port, the value of 7676 is used. For example: host1:8899,host2,:7878. -dbpassword password Specify the password for a plugged-in JDBC-compliant database used as a Message Queue data store. -dbuser userName Specify the user name for a plugged-in JDBC-compliant data store. -Dproperty-=value Set the specified broker configuration property to the value. The system does not validate either the configuration property or value. Therefore, spelling, formatting, and case is important. Message Queue can not set incorrect values passed using the -D option. -force Perform action without user confirmation. This option only applies when you use the -remove instance option, which normally requires confirmation. -h Display usage help. Execute nothing else on the command line. -javahome path Specify the path to an alternate Java 2-compatible Java Development Kit (JDK) or Java Runtime Environment (JRE) The default is to use the runtime bundled with the operating system. -ldappassword password Specify the password for accessing an LDAP user repository when using an LDAP server (as opposed to a built-in flat-file repository) to authenticate users of a Message Queue message server. -license [name] Specify the license to load, if different from the default for your Message Queue product edition. If you don't specify a license name, this lists all licenses installed on the system. Depending on the installed Message Queue edition, the values for name are pe (Platform Edition-basic features), try (Platform Edition-90-day trial enterprise features), and unl (Enterprise Edition). -loglevel level Specify the logging level. Valid values for level are NONE, ERROR, WARNING, or INFO. The default value is INFO. -metrics int Report metrics at a specific interval. Specify int as the number of seconds. -name brokerName Specify the instance name of this broker and use the corresponding instance configuration file. If you do not specify a broker name, the name of the file is set to imqbroker. If you run more than one instance of a broker on the same host, each must have a unique name. -passfile filename Specify the name of the file from which to read the passwords for the SSL keystore, LDAP user repository, or JDBC-compliant database. -password keypassword Specify the password for the SSL certificate keystore. -port number Specify the broker's Port Mapper port number. By default, this is set to 7676. To run two instances of a broker on the same server, each broker's Port Mapper must have a different port number. JMS clients connect to the broker instance using this port number. -remove instance Remove the broker instance. Delete the instance configuration file, log files, data store, and other files and directories associated with the broker instance. This option requires user confirmation unless you also specify the -force option. -reset store|messages|durables|props Reset the data store (or a subset of the store) or resets the configuration properties of the broker instance when the broker instance is started. The action depends on the argument provided. store Clear all persistent data in the data store, including messages, durable subscriptions, and transaction information store. messages Clear all persistent messages durable. durables Clear all durable subscriptions. props Clear all configuration information in the config.props instance configuration file. All properties assume default values. -restore filename Replace the Master Broker's configuration change record with the specified backup file. This file must have been previously created using the -backup option. This option only applies to broker clusters. -shared Specify that the jms connection service be implemented using the shared threadpool model, in which threads are shared among connections to increase the number of connections supported by a broker instance. -silent Turn off logging to the console. -tty Display all messages be to the console. WARNING and ERROR level messages are displayed on the console by default. -upgrade-store-nobackup Specify that an earlier, incompatible version Message Queue data store is automatically removed when migrating to Message Queue 3.5 format. If you do not use this option, you must manually delete the earlier data store. This applies to both built-in (flat-file) persistence and plugged-in (JDBC-compliant) persistence. Migration of the earlier data store to a Message Queue 3.5 data store takes place the first time you start a Message Queue 3.5 broker instance on an earlier version data store. -version Display the version number of the installed product. -vmargs are [[arg]...] Specify arguments to pass to the Java VM. Separate arguments with spaces. If you want to pass more than one argument or if an argument contains a space, use enclosing quotation marks. For example: imqbrokerd -tty -vmargs " -Xmx128m -Xincgc" ENVIRONMENT VARIABLES
The following environment variables affect the execution of this command: IMQ_JAVAHOME Specify the Java 2 compatible runtime. When this environment variable is not set it defaults to /usr/j2se. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. FILES
/etc/init.d/imq Shell script for starting imqbrokerd. This file looks at the /etc/imq/imqbrokerd.conf file. /etc/imq/imqbrokerd.conf Configuration file which controls the behavior of the broker startup script. /etc/imq/passwd Flat file user repository for authenticating users. /etc/imq/accesscontrol.properties Controls client access to broker functionality. /etc/imq/passfile.sample Sample passfile used by the -passfile option. /var/imq/instances/brokerName/props/config.properties Broker instance configuration file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWiqu | +-----------------------------+-----------------------------+ SEE ALSO
imqadmin(1M), imqcmd(1M), imqdbmgr(1M), imqkeytool(1M), imqobjmgr(1M), imqusermgr(1M), attributes(5) Sun Java System Message Queue Administrator's Guide SunOS 5.11 11 Mar 2004 imqbrokerd(1M)
All times are GMT -4. The time now is 12:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy