Sponsored Content
Top Forums Shell Programming and Scripting awk to count start and end keyword in a line Post 302791983 by ctsgnb on Tuesday 9th of April 2013 01:52:21 PM
Old 04-09-2013
Assuming your input exactly looks like the example you provided :

Code:
echo $test | awk -F"= =" 'NF%2{print "Deploymeny still in progress"}'

This User Gave Thanks to ctsgnb For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extract a particular start and end pattern from a line

hi In the foll example the whole text in a single line.... i want to extract text from IPTel to RTCPBase.h. want to use this acrooss the whole file Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1... (7 Replies)
Discussion started by: manish205
7 Replies

2. Shell Programming and Scripting

Line Count and Append it to the end of the file.

Hi, I want to get a Line count of a file and append that at the end of the file. The Line count should not include the Headers : ------------------ COL1,COL2,COL3 123,abc,011 111,abd,0212 Record Count: 2 ------------------- Thanks. (7 Replies)
Discussion started by: smc3
7 Replies

3. Shell Programming and Scripting

String as both start and end anchors in awk

Not sure if the title of this thread makes sense, but hopefully my explanation will. I'm using awk to print some stats from an apache accesslog. I would like to specify the regexp condition where only the two root pages of "index.html" and "/" are counted in my results. What I can't figure out... (3 Replies)
Discussion started by: picassolsus
3 Replies

4. Shell Programming and Scripting

sed: Find start of pattern and extract text to end of line, including the pattern

This is my first post, please be nice. I have tried to google and read different tutorials. The task at hand is: Input file input.txt (example) abc123defhij-E-1234jslo 456ujs-W-abXjklp From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Discussion started by: TestTomas
5 Replies

5. Shell Programming and Scripting

End of each line count the values in the file

Hi, How to find the end of character in the file. My requirement should be as below.1 is repeating 1 time ,2 is repeating 3 times... type 1: 1 type 2: 3 type 3: 2 9f680177|20077337258|0|0|0|1000004647916|1 9f680177|20077337258|0|0|0|1000004647916|2 9f680177 20077337258 0 0 0... (5 Replies)
Discussion started by: bmk
5 Replies

6. Shell Programming and Scripting

Remove lines between the start string and end string including start and end string Python

Hi, I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Discussion started by: Dabheeruz
1 Replies

7. Shell Programming and Scripting

Search for a Keyword in file and replace another keyword or add at the end of line

Hi I want to implement something like this: if( keyword1 exists) then check if(keyword2 exists in the same line) then replace keyword 2 with New_Keyword else Add New_Keyword at the end of line end if eg: Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies

8. Shell Programming and Scripting

Grep start and end line of each segments in a file

Cat file1 -------- ---------- SCHEMA.TABLE1 insert------- update----- ------------- ---------- SCHEMA.TABLE2 insert------- update----- ----------- ------------ SCHEMA.TABLE3 insert------- update----- ------------ grep -n SCHEMA > header_file2.txt (2 Replies)
Discussion started by: Veera_V
2 Replies

9. Shell Programming and Scripting

Find between lines start and end: awk with bash variables

I have a file as follows: 0 1056 85540 414329 774485 1208487 1657519 2102753 2561259 3037737 3458144 3993019 4417959 4809964 5261890 5798778 6254146 I want to find all lines between a specified start and end tag. (6 Replies)
Discussion started by: jamie_123
6 Replies

10. Shell Programming and Scripting

Printing string from last field of the nth line of file to start (or end) of each line (awk I think)

My file (the output of an experiment) starts off looking like this, _____________________________________________________________ Subjects incorporated to date: 001 Data file started on machine PKSHS260-05CP ********************************************************************** Subject 1,... (9 Replies)
Discussion started by: samonl
9 Replies
asadmin-deploydir(1AS)						   User Commands					    asadmin-deploydir(1AS)

NAME
asadmin-deploydir, deploydir - deploys an exploded format of application archive SYNOPSIS
deploydir --user admin_user[--password admin_password][--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename] [--terse=false] [--echo=false] [--interactive=true] [--virtualservers virtual_servers] [--contextroot context_root] [--force=true] [--ver- ify=false] [--precompilejsp=false][--name component_name] [--uniquetablenames=true | false] [--dbvendorname dbvendorname] [--createta- bles=false | --dropandcreatetables=false] dirpath Deploys the exploded format of the application archives present under the directory provided as the command operand. The deployed format, of EAR or WAR applications, reside on the application server and have a directory structure which can be used for deployment. The --force option makes sure the component is forcefully (re)deployed even if the specified component has already been deployed or already exists. Set --force to false for a first deployment. If the application with that name is running, and force is set to false, the command fails. If the --uniquetablenames, --createtables, and --dropandcreatetables options are not specified, the entries in the deployment descriptors are used. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. --echo setting to true will echo the command line statement on the standard output. --interactive prompts you for the required options that are not already specified. --virtualservers comma separated list of virtual server IDs. --contextroot valid only if the archive is a web module. It is ignored for other archive types; defaults to filename without extension. --force makes sure the component is forcefully (re)deployed even if the specified component has already been deployed or already exists. --precompilejsp by default is set to false which does not allow the JSP to pre-compile during deployment. Instead JSPs are compiled during runtime. --verify if set to true, the syntax and semantics of the deployment descriptor is verified. --name name of the deployable component. --uniquetablenames guarantees unique table names for all the beans and results in a hashcode added to the table names. This is useful if you have an pplication with case-sensitive bean names. --dbvendorname name of the database vendor being used. Default is the corresponding entry in the cmp-resource () element of the sun-ejb-jar.xml file. If not specified, the default is SQL92. Thereby the DDL files to create and drop tables will be generated in SQL92 format. --createtables creates tables during deployment for applications using unmapped CMP beans. Default is the corresponding entry in the cmp-resource element of the sun-ejb-jar.xml file. If not specified, defaults to the entries in the deployment descriptors. --dropandcreatetables drops existing tables and creates tables during deployment for application using unmapped CMP beans. If not speci- fied, the tables will be dropped if the drop-tables-at-undeploy entry in the cmp-resource element of the sun-ejb- jar.xml file is set to true. The new tables are created if the create-tables-at-deploy entry in the cmp-resource element of the sun-ejb-jar.xml is set to true. On redeploy the tables created by the previous deploy are dropped before creating the new tables. OPERANDS
dirpath path to the directory containing the exploded format of the deployable archive. Example 1: Using deploydir asadmin> deploydir --user admin --passwordfile passwords.txt --host localhost --port 4848 --force=true --precompilejsp=true /home/temp/sampleApp Command deploydir executed successfully Where: theexploded application to be deployed is in the /home/temp/sampleApp directory. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-deploy(1AS), asadmin-undeploy(1AS), asadmin- enable(1AS), asadmin-disable(1AS), asadmin-list-components(1) J2EE 1.4 SDK March 2004 asadmin-deploydir(1AS)
All times are GMT -4. The time now is 07:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy