« first day (549 days earlier)      last day (2510 days later) » 

 
4 hours later…
6:43 AM
hi
anyone there need help
 
@aashish_soni what's up ?
 
hey
i want to replace a string in script
i Have a scritpt like this..
echo "********************* STARTED ingest_ScrictA.sh *********************************"
sh /home/<path>/ingest_ScrictA.sh
RetCode=$?
if [ $RetCode -ne 0 ]
then
echo "Script ingest_ScrictA.sh execution failed with error code - $RetCode"
echo "Date...$(date)"
curl -D- POST --data "{\"xxx\":{\"projecxxt\":{\"keyxx\":\"xxx\"},\"summary\":\"ingest_ScrictA.sh failed\",\"customfield_11001\":\"xxxxxxxxxxxxxx\",\"issuetype\":{\"name\":\"Support Task\"}}}" -H "Content-Type: application/json" http://xxxxxxxxx.domain.com/rest/api/2/issue/
 
and what do you want to change ?
 
inside script i have so many STARTED lines.. like above i mentioned
 
hold on can't see the entire post above .... it's loading
you have many like the first line I see
what is it you want to do with the string ?
 
6:55 AM
############my script
echo "********************* STARTED ingest_ScrictA.sh *********************************"
sh /home/<path>/ingest_ScrictA.sh
RetCode=$?
if [ $RetCode -ne 0 ]
then
echo "Script ingest_ScrictA.sh execution failed with error code - $RetCode"
echo "Date...$(date)"
curl -D- POST --data "{\"xxx\":{\"projecxxt\":{\"keyxx\":\"xxx\"},\"summary\":\"ingest_XXXX.sh failed\",\"customfield_11001\":\"xxxxxxxxxxxxxx\",\"issuetype\":{\"name\":\"Support Task\"}}}" -H "Content-Type: application/json" http://xxxxxxxxx.domain.com/rest/api/2/issue/
 
do you want to manipulate the scring during execution or do you want to edit and change the string in the script ?
 
i script h posted before it was my desired output
i want to read a name from exaclty above STARTED scriptname and put into cul summary
 
what do you mean by "I want to read a name" ... you want to extract the lines containing the string "STARTED" from the output of the script ?
 
after the STARTED
like ingest_ScriptA....B... and so on
let me out it simple
echo "********************* STARTED ingest_ScrictA.sh *********************************"
summary: want to put above script name here thats it
echo "********************* COMPLETED ingest_ScrictA.sh *********************************"

echo "********************* STARTED ingest_ScrictB.sh *********************************"
summary: want to put above script name here thats it
echo "********************* COMPLETED ingest_ScrictB.sh *********************************"
Just remember there are so many scripts
can we do this?
hey thr?
 
7:14 AM
echo "$0"
or
echo "$(basename $0)"
if you want just the name and not the path
 
 
1 hour later…
8:39 AM
thats i manual , i want to create a script that do automatically
 
for A in scriptA.s scriptB.sh
do
  echo "about to run $A"
  $A && echo done || echo fail
done
now each script would have
echo "$(basename $0)"
in it
 
can we use any grep commmand for thi
*this?
 
9:04 AM
do you want to grep from the script output ?
 
9:33 AM
Hello everyone.... how can I check a warning message in a shell script response...For example
I have this script
installStunnel(){
if ! type stunnel > /dev/null; then
echo 'install latest stunnel';
brew install stunnel $retval

else
echo 'stunnel already installed';
fi
}
if brew install stunnel ---- gives a warning like
Warning: stunnel-X.Y.Z already installed, it's just not linked
how can i check this?... so that i can execute another command
 
 
4 hours later…
1:42 PM
Would it be possible to check return codes ?
 

« first day (549 days earlier)      last day (2510 days later) »