Skip to content
Advertisement

Tag: bash

How to send emails via cron job usng Golang MySQL?

Hope you all doing well. how can i using cron job and cron tab(by golang connection my sql) or anothor way using bash script excute (file golang) how can i do that. in crontab -e : set the code 31 17 * * * cd /home/shanaz/Desktop/GO export/home/shanaz/Desktop/GO:bash sql.sh when sql.sh code here go run sqll.go Answer Hope you’re doing well

Why does bash go into an infinite loop?

I was trying out different ways of emulating a boolean variable in bash. One method is: which prints true and false respectively. Then I had a brain cramp and typed: expecting to see yes in the terminal. However, without the echo command, it went into an infinite loop printing y. Can someone explain what bash is doing here? Answer bash

Extracting group from regex

I am new to using regex and having some issues understanding how to extract a group from a regular expression. I have a text file (example.txt): I am trying to extract the “5.2.1” only from the libpackage line and put it into a variable for a bash script. I have tried doing But it gives me the entire line instead

How to install new relic on amazon linux

I have have unzipped newrelic files onto amazon linux and have both the installer.sh and config_defaults.sh I have the license key in the parameter store which I am able to call I install newrelic with the following command Where APPIKEY comes from the parameter store. However when I do sudo systemctl start newrelic-infra I get error message How can I

unzip a list of archives

I need to Unzipped a list of zip archives. These archives are not empty, in each one there are a lot of file. In my directory I have a lot of file zip archive and all have the the name in the same format: batch-download-ccd-1610959358275.zip but change only the numeric part. I can extract each archive with unzip command but

Bash script : problem with my substraction

I would like to make a script that will calculate the difference of download time between two curl. For example with this command : My curl command will be run each day and I would like to make a substraction between the value of the day and the value of the previous day. For that, I will save the time_total

Advertisement