If the loop goes over the running processes, how are the not running processes detected then?
The following loops over the files to get the DB instances, then looks them up in the ps output:
It avoids bash4 arrays - instead it does a lookup in a simple variable.
Thank you very much
Its worked like a charm. bit modified to display output like below and terminal output is like:
However, as you suggested I am using below line to slack...however only first two line going into slack..
the below is code currently being used for slack post:
On terminal I am getting all output but, on slack i get only the below values
no clue why it printing only these lines.. do I need to print instead of echo ?. any suggestion pls
Is there any way to send terminal screen output same format to slack as it is?
------ Post updated at 01:13 PM ------
Quote:
Originally Posted by onenessboy
Thank you very much
Its worked like a charm. bit modified to display output like below and terminal output is like:
However, as you suggested I am using below line to slack...however only first two line going into slack..
the below is code currently being used for slack post:
On terminal I am getting all output but, on slack i get only the below values
no clue why it printing only these lines.. do I need to print instead of echo ?. any suggestion pls
Is there any way to send terminal screen output same format to slack as it is?
Hi,
Some how i am able to output all values in terminal.. Up to this point i am able to achieve...now problem is with posting it to slack..even though I mention \n its not printing line by line in slack...
Terminal output (I have stored into variable, so echo it):
Now trying to read line by line from this variable with below code:
its showing error like:
but in above code I guess while loop is not working properly...is that correct way of reading multi line variable and pass on to payload in curl statement
Last edited by onenessboy; 11-17-2018 at 06:35 AM..
Hi,
Am supposed to use message queues to send and receive messages between the processes. when i was working on that i realised that the message qid and the message queue related data should be maintained in a shared memory so that it can be accessed by all the processes. Could anybody refer... (10 Replies)
I am trying to write a script that will help me put a file into excel with little manipulation. Below is a sample of the file im using.
Group1:*:gid1:user,user
Group2:*:gid2:user,user
Group3:*:gid3:user,user,user,user,user,user,user
Group4:*:gid4:user,user
I marked in red the part that is... (1 Reply)
Hello all, I have been asked to exercise my shell scripting and it has been 10 plus years since I used to do it so I can not remember hardly anything and ask for your help.
What I need to do is copy a line out of a file that can be 10 to 100 characters long, I then need to parse this line into... (3 Replies)
I have a file with data records separated by multiple equals signs, as below.
==========
RECORD 1
==========
RECORD 2
DATA LINE
==========
RECORD 3
==========
RECORD 4
DATA LINE
==========
RECORD 5
DATA LINE
==========
I need to filter out all data from this file where the... (2 Replies)
i have to remove the commented (/* . . . .*/) part which starts in one line and ends in other.help me with generic code because i have 1000 to 10k lines code which i have to remove.
data one;
set work.temp;
input name age;
infile filename;
/* dfsdf
dsfs
sdfdf
dsdd
sdfsf
sdfsf
sfs... (4 Replies)
It looks like if matching and deleting the last line confuses 'sed' so it does not recognize '$' address. Consider:
sed -e '/^3/d' -e '$ a text'
supposed to delete a line starting with '3' and then append 'text' after the last line of input. But, if it is the last line of input which starts... (2 Replies)
Hello,
Currently, I am reading few queries from the below .sql file
--SOURCE TABLE NAME
--SOURCE QUERY
SEL COL1, COL2, COL3, COL4,
COL5, COL6, COL7 WHERE COL5 = '2015-11-04 16:24:00.000000' FROM SOURCE TABLE;
--TARGET TABLE NAME
--TARGET QUERY
SEL COLUMN1, COLUMN2, COLUMN3, COLUMN4,... (4 Replies)
Hi there,
I'm trying to create a script that will accept multiple inputs by copying and pasting the strings from a notepad, hit Enter key and output the string to a text file.I'm thinking of using the read command however it will just simply get the first line.
Apologies but got no idea how... (7 Replies)
Hi,
Can anyone help me for merge the following multi-line log which beginning with a " and line ending with ": into one line.
*****Original Log*****
087;2008-12-06;084403;"mc;;SYHLR6AP1D\LNZW;AD-703;1;12475;SYHLR6AP1B;1.1.1.1;0000000062;HGPDI:MSISDN=12345678,APNID=1,EQOSID=365;... (3 Replies)