![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 !! |
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 12:00 PM |
| Help on page breaks | simhasuri | Shell Programming and Scripting | 1 | 01-31-2008 04:51 PM |
| Removing line breaks from a shell variable | lyonsd | Shell Programming and Scripting | 5 | 09-12-2006 01:42 PM |
| Page Breaks | rama71 | High Level Programming | 9 | 06-29-2005 12:28 PM |
| Insert page breaks into .csv file | welsht | Shell Programming and Scripting | 2 | 02-04-2005 02:39 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|