Sponsored Content
Top Forums Shell Programming and Scripting Print awk output in same line ,For loop Post 302966345 by RudiC on Thursday 11th of February 2016 03:51:02 AM
Old 02-11-2016
With all those exclusions, is "pmon" the right thing to match? And, as the first field in ps's IS the (already known and matched for?) username, do you really need to obtain it from your script?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk help required to group output and print a part of group line and original line

Hi, Need awk help to group and print lines to format the output as shown below INPUT FORMAT set echo on set heading on set spool on /* SCHEMA1 */ CREATE TABLE T1; /* SCHEMA1 */ CREATE TABLE T2; /* SCHEMA1 */ CREATE TABLE T3; /* SCHEMA1 */ CREATE TABLE T4; /* SCHEMA1 */ CREATE TABLE T5;... (5 Replies)
Discussion started by: rajan_san
5 Replies

2. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

3. Shell Programming and Scripting

Print in New line in loop

Hi , i want to print the output in line by line while read LINE do echo $LINE | grep UCM | egrep '(Shutdown|Unavailable)' echo $LINE | grep SRBr | egrep '(Shutdown|Unavailable)' echo $LINE | grep SRP| egrep '(Shutdown|Unavailable)' echo $LINE | grep OM | grep JMS|... (7 Replies)
Discussion started by: navsan
7 Replies

4. Shell Programming and Scripting

Print for loop variable in output too

Hi, This is my input file cat input chr1:100-200 chr1:220-300 chr1:300-400 Now, I would like to run a program that will take each of the input record for i in `cat input`; do program $i | wc -l;done the output will be something like 10 20 30 But, I would like to print the... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

5. UNIX for Dummies Questions & Answers

Print each output of loop in new column using awk or shell

I have this output from a loop a11 1,2 3,4 5,6 7,8 12,8 5,4 3,6 a12 10,11 12,13 15,18 20,22 a13 ... (3 Replies)
Discussion started by: maryre89
3 Replies

6. Shell Programming and Scripting

(n)awk: print regex search output lines in one line

Hello. I have been looking high and low for the solution for this. I seems there should be a simple answer, but alas. I have a big xml file, and I need to extract certain information from specific items. The information I need can be found between a specific set of tags. let's call them... (2 Replies)
Discussion started by: Tobias-Reiper
2 Replies

7. Shell Programming and Scripting

Grep echo awk print all output on one line

Hello, I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it. I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies

8. UNIX for Beginners Questions & Answers

Output to file print as single line, not separate line

example of problem: when I echo "$e" >> /home/cogiz/file.txt result prints to file as:AA BB CC I need it to save to file as this:AA BB CC I know it's probably something really simple but any help would be greatly appreciated. Thank You. Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies

9. Shell Programming and Scripting

Print loop output on same line dynamically

Hi, I am trying to print copy percentage completion dynamically by using the script below, #!/bin/bash dest_size=0 orig_size=`du -sk $sourcefile | awk '{print $1}'` while ; do dest_size=`du -sk $destfile | awk '{print $1}'` coyp_percentage=`echo "scale=2; $dest_size*100/$orig_size"... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
Plucene::Search::TermQuery(3pm) 			User Contributed Perl Documentation			   Plucene::Search::TermQuery(3pm)

NAME
Plucene::Search::TermQuery - a query that contains a term SYNOPSIS
# isa Plucene::Search::Query $term_query->normalize($norm); my $ssw = $term_query->sum_squared_weights($searcher); my $as_string = $term_query->as_string($field); DESCRIPTION
A query that matches a document containing a term. Term query are the simplest possible Plucene queries and are used to match a single word. Term queries are represented by instances of the TermQuery class and contain the desired term (word) and a field name, both are case sensitive. The field specified in a Term query must be a document field that was specified as 'indexible' during the indexing process. If the field was specified during indexing as 'tokenized' than the term will be matched against each of tokens (words) found in that field, otherwise, it will be matched against the entire content of that field. A term query may have an optional boost factor (default = 1.0) that allows to increase or decrease the ranking of documents it matches. METHODS
term / idf / weight Get / set these attributes sum_squared_weights my $ssw = $term_query->sum_squared_weights($searcher); This will return the sum squared weights for the passed in searcher. normalize $term_query->normalize($norm); to_string my $as_string = $term_query->as_string($field); perl v5.12.4 2011-08-14 Plucene::Search::TermQuery(3pm)
All times are GMT -4. The time now is 01:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy