Grep the only instance name


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Grep the only instance name
# 1  
Old 05-16-2013
Grep the only instance name

Hi,
I want to get the only application name from the server.
Ex:
if i give $ ps -ef | grep bw.
It will show all BW process with entire path. It will little confuse to list out the process. Can anyone have syntax to get only the instance name. I need this for be, hawk,ems also.

Please help.

Thanks,
Chelladurai.
# 2  
Old 05-16-2013
Are you talking about TIBCO products process? if you provide the o/p of ps -ef|grep bw we can try to solve your problem..
# 3  
Old 05-16-2013
Hi,
Please find the output

Code:
usergroup 30981 1 0 may09? 00:00:29 /opt/tibco/domain/TRN/3.2/tra/5.7/bin/bwengine --pid --run --propfile \
 /apps/tibco/domain/TRN/3.2/tra/domain/CIS_TRN_PRD/application/cardservices/cardservices.tra --innerprocess


Last edited by Scott; 05-16-2013 at 10:04 AM.. Reason: Code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

One instance of comparing grep and awk

Hi. In thread https://www.unix.com/shell-programming-and-scripting/267833-grouping-counting.html rovf and I had a mini-discussion on grep and awk. Here is a demo script that compares the awk and grep approaches for this single problem: #!/usr/bin/env bash # @(#) s2 Demonstrate group... (1 Reply)
Discussion started by: drl
1 Replies

2. Windows & DOS: Issues & Discussions

win2008R2 using gnu grep/awk to find only the I instance out of the command

Ok, running tsm on 2008R2, and I have the gnu awk and grep installed...I want to only capture inactive (I) files inside of the backup...I can get this to work on linux, but because windows interprets " ' ` differently, i can't get it to print out right...Here's what I have: so basically... (8 Replies)
Discussion started by: nextreme
8 Replies

3. Shell Programming and Scripting

How can I just grep one instance of a word in the file

I want to grep some information out of the dmidecode but when I type dmidecode | grep Memory I get several instances of the word. Is there a way I can just choose which instance I want to display? (8 Replies)
Discussion started by: jcnewton13
8 Replies

4. Shell Programming and Scripting

grep for a string until instance of a space

Hey guys, I'm having a bit of trouble getting this to work using either sed or grep. It's possible awk might be the ticket I need as well, but my regulat expression skills aren't quite up to the task for doing this. I'm looking to grep for the string ERROR from the following log up until any... (6 Replies)
Discussion started by: terrell
6 Replies

5. Shell Programming and Scripting

grep second instance of same string

Hi all, i am new to unix scripting in ksh or any shell for that matter. I have downloaded a xml file from a website and saved on my local harddrive. inside the xml, the same tag is listed multiple times. <title>Tonight</title> <title>Thursday</title> <title>Friday</title>... (6 Replies)
Discussion started by: scubasteve39
6 Replies

6. Shell Programming and Scripting

Search text file, then grep next instance of string

I need to be able to search for a beginning line header, then use grep or something else to get the very next instance of a particular string, which will ALWAYS be in "Line5". What I have is some data that appears like this: Line1 Line2 Line3 Line4 Line5 Line6 Line7 Line1 Line2 ...... (4 Replies)
Discussion started by: Akilleez
4 Replies

7. Shell Programming and Scripting

What does : do in this instance

Guys please see below functions to return a status depending on user input. Both seem to work the same. The second way has a : line which i can't understand or see in a ksh manual anywhere. Instead of doing the variable change if its empty on this line the first function simply does it on the... (7 Replies)
Discussion started by: lavascript
7 Replies

8. Shell Programming and Scripting

replace first instance(not first instance in line)

Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies

9. UNIX for Dummies Questions & Answers

Copy Db Instance

I need to copy my Live Db Instance to my Test Db Instance Can somebody please tell me the easiest way to go about this It is an Informix Database running on HP-UX Thanks (0 Replies)
Discussion started by: cobdeng
0 Replies

10. UNIX for Dummies Questions & Answers

finding first instance

I have a file with 3 columns. Often the first two will hold the same values and the third may differ. I only want one row for each. i.e. aaa,bbb,1 aaa,bbb,2 aaa,bbb,3 xxx,yyy,1 xxx,yyy,2 zzz,rrr,5 Should be aaa,bbb,1 xxx,yyy,1 zzz,rrr,5 I just want the first instance of... (20 Replies)
Discussion started by: peter.herlihy
20 Replies
Login or Register to Ask a Question