The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
'exec /bin/sh' breaks alias stulincoln Shell Programming and Scripting 1 05-29-2008 09:00 AM
Help on page breaks simhasuri Shell Programming and Scripting 1 01-31-2008 01:51 PM
Removing line breaks from a shell variable lyonsd Shell Programming and Scripting 5 09-12-2006 10:42 AM
Page Breaks rama71 High Level Programming 9 06-29-2005 09:28 AM
Insert page breaks into .csv file welsht Shell Programming and Scripting 2 02-04-2005 11:39 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 05-01-2007
Registered User
 

Join Date: Mar 2007
Posts: 21
Newbie ? Need Help with If/Then & Line Breaks...

I hope this makes sense, but I need help with what is indicated with %%, below :

A.) ####List active servers and send to file####

# ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results

client302
client306
client309
client310
client312
client313
client314
client315
client317
client318
client319
client320
client321
client322
client323
client324
p001
p002
train310
train318
train319
train320


%% if results = p00*, then do B.) and delete p00* from the list above....%%

B.) ####List active tenants is a pod and append to file####

cd /u01/app/jboss/rnj/properties/%%p001%%/com/paisley/rnj/config
cat Application.properties | awk -F\. '/active=true/{print $1}' | sort >> /export/home/kthatch/script_results

cd /u01/app/jboss/rnj/properties/%%p002%%/com/paisley/rnj/config
cat Application.properties | awk -F.\ '/active=true/{print $1}' | sort >> /export/home/kthatch/script_results

%% p001 need to insert line break & header "P001" %%
client1000
client1001
client1002
client1003
client1004
client1005
client600
client601
client602
client603


%% p002 need to insert line break & header "P002" %%
train310
train318
train319
train320
client1021
client1022
client1023
client1024
client1025
client1026
client1027
client1028
client1029
client1030
Forum Sponsor
  #2  
Old 05-01-2007
reborg's Avatar
Administrator
 

Join Date: Mar 2005
Location: Ireland
Posts: 3,590
ktatch please read the rules to know why this thread was closed.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0