The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Find CPU per process in AIX yamsin789 AIX 1 04-01-2009 07:13 AM
How to find out how much RAM that process is using redlotus72 UNIX for Dummies Questions & Answers 3 08-08-2008 10:22 AM
find a process age MizzGail UNIX for Dummies Questions & Answers 8 05-24-2006 05:38 AM
how to find the chid process id from given parent process id guhas Shell Programming and Scripting 3 10-13-2005 08:13 AM
find eof, then process mfilby Shell Programming and Scripting 12 12-22-2003 06:29 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-09-2008
manas_ranjan's Avatar
manas_ranjan manas_ranjan is offline
Registered User
  
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
How to find the actual process name

Dear All
I have created customisation appliaction for my application process which look likes below,
364688 ach_outbound -proc nla_acho_equ_01 -format EQUENS0001 [fat] DEQ WAIT
1167452 listener -p 42662 hostget_server -proc at_vld 11874 at_vld [fat] IDLE
1560634 listener -p 11870 menu [fat] IDLE
1843302 rate_server [fat] DEQ WAIT

so now my concern is how can i fetch middle column between process id and [fat] i.e.
my o/p shuould look like
ach_outbound -proc nla_acho_equ_01 -format EQUENS0001
listener -p 42662 hostget_server -proc at_vld 11874 at_vld
listener -p 11870 menu
rate_server
  #2 (permalink)  
Old 12-09-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
One way:
Code:
root@isau02:/data/tmp/testfeld> cat bla
364688 ach_outbound -proc nla_acho_equ_01 -format EQUENS0001 [fat] DEQ WAIT
1167452 listener -p 42662 hostget_server -proc at_vld 11874 at_vld [fat] IDLE
1560634 listener -p 11870 menu [fat] IDLE
1843302 rate_server [fat] DEQ WAIT
root@isau02:/data/tmp/testfeld> sed 's/^[0-9]* \([^\[]*\).*/\1/' bla
ach_outbound -proc nla_acho_equ_01 -format EQUENS0001
listener -p 42662 hostget_server -proc at_vld 11874 at_vld
listener -p 11870 menu
rate_server
  #3 (permalink)  
Old 12-09-2008
manas_ranjan's Avatar
manas_ranjan manas_ranjan is offline
Registered User
  
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
thank you so much.....it's working...fine..but can we right the same in awk...
  #4 (permalink)  
Old 12-09-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
I bet you can.
  #5 (permalink)  
Old 12-09-2008
manas_ranjan's Avatar
manas_ranjan manas_ranjan is offline
Registered User
  
 

Join Date: Jul 2007
Location: Amsterdam
Posts: 177
thank you so much for your support...i did it
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:04 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0