![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 | ||
|
|