Questions tagged [bash]
Bash is the Bourne Again SHell, the successor to the classic Unix sh (shell).
3,566
questions
-1
votes
0
answers
17
views
Check PDF signature expirity date in linux terminal
So, a client of mine has around 10 thousand PDF, all digitally signed. She would like me to create an Excel sheet for her and in this sheet I need to show the name of the PDF in a column, the date of ...
0
votes
0
answers
31
views
MSSQL Restore command taking over the terminal for 10 minutes
I run MSSQL as a statefulset on Kubernetes (I use the official docker image)
I wrote a startup script that should restore $n backups on $n databases.
my problem is: first database gets restored ...
0
votes
0
answers
74
views
How to interface with Postfix `non_smpt_milter`?
After many hours attempting to configure OpenDKIM with Postfix and having no luck, I have come to the conclusions that:
I cannot get OpenDKIM to work
I am not able to find a suitable out-of-the box ...
0
votes
1
answer
21
views
Script to check if AWS EBS is optimizing after change
I deal with asymmetric clusters of EC2 nodes. There are certain operations which can only be safely carried out when none of the EBS volumes in the cluster are in an "optimizing" state (e.g. ...
3
votes
2
answers
174
views
How does sort compare strings?
I would expect bash sort to compare strings like this:
Start at the first char (of both strings)
If the chars are equal, proceed to the next char
If they are unequal, return greater/lesser result to ...
2
votes
1
answer
100
views
bash string replace has 'bad substitution' error
I am attempting to create a folder structure to test a backup script.
The folders are date based, and will have a modification time of the date of the folders name.
to do this i am creating a list of ...
1
vote
1
answer
36
views
Bash script with "openssl req -new -key server.key -out server.csr -config server_openssl.cnf --passin pass:password"
I am writing a bash script that will generate a root certificate and a server certificate. The root certificate generation works, but the server certificate prompts me for input - however since this ...
1
vote
1
answer
34
views
Bash script with openssl req -new -key rootCA.key -out rootCA.csr -config rootCA_openssl.cnf --passin pass:password
I am generating a root certificate with a bash script.
I have a rootCA_openssl.cnf file with the configuration data:
rootCA_openssl.cnf
[ req ]
distinguished_name = req_distinguished_name
...
1
vote
1
answer
121
views
How to Dynamically Adjust Rate Limits Based on Concurrent Connections in Nginx?
I am currently facing a challenge with dynamically adjusting rate limits in my Nginx configuration based on the number of concurrent connections to my web server.
Problem Statement:
I have set up a ...
0
votes
0
answers
24
views
Packer not running any shell scripts
I have a provisioner to run a shell script, as per all the docs I found on the line, but nothing seems to actually run anything, it just sits and exists after a minute or two.
"provisioners"...
0
votes
1
answer
39
views
CRON bash script certbot renew hangs
I have this script in /home/user/renew.sh
( cd /home/user/website/ && docker compose run --rm certbot renew --dry-run && docker compose kill -s SIGHUP webserver )
sudo crontab -e
*/5 *...
0
votes
2
answers
120
views
Bash: build command string with quotes and invoke it directly
In bash, this sequence doesn't work the way I thought it would:
> command="echo \"foo bar\""
> $command
"foo bar"
Using eval instead:
> eval $command
foo bar
...
1
vote
2
answers
206
views
Storing top output to a file continuously
I'm currently using top to gather the most resource intensive processes and sending them to influxdb. Currently, the command is like this:
top -bn1 -c -w250
Which basically runs top a single time (-...
0
votes
1
answer
96
views
Unable to query or rm file from an smb mount, but it appears using ls
Problem
I have a file that cannot be removed or queried in, but it does appear using ls and does not allow overwriting it.
# ls -l
-rwxr-xr-x 1 root root 151040 Mar 22 21:55 export.mb
-rwxr-xr-x 1 ...
0
votes
0
answers
34
views
Kubernetes (CRI-O) cannot ping to any host
Cannot ping to any host from kubenetes pod.
Needed functionality: Ping between 2 kubernetes pods
Expected result: Successful ping between 2 pods.
Current output:
pod/kube-server-rtt-3 created
pod/kube-...