How Do You Troubleshoot a Linux Script Not Redirecting the Output to a File?

Problem scenario
You have a Bash script with a task that is supposed to redirect the output to a file. The command produces output when you manually run it. But the output is not getting to the file. What could be wrong?

Possible Solution
If the output of the automation has a message and the OS is Linux, the command may or may not work.

…

How Do You Run Snyk Scans as Part of Azure DevOps Pipelines?

Problem scenario
You know that many sources recommend you scan IaC code as part of modern security recommended practices. (Page 293 of Terraform: Up & Running, 2nd Edition by Yevgeniy Brikman (O’Reilly), Copyright 2019, 978-1-492-04690-5 recommends using Snyk.) You tried to create a new pipeline in Azure DevOps. You tried to add a Snyk task. But you were not able to. Why in Azure DevOps do you not see a Snyk option for a task to add to a pipeline?

…

How Do You Troubleshoot “‘configure’ was unable to find any version of the GTK libraries on your system.”?

Problem scenario
You are running the “configure” script on a RHEL server. You get this error:

“‘configure’ was unable to find any version of the GTK libraries on your system.”

What should you do?

Solution
Run this:

sudo yum -y install gtk2-devel …

What Are Common Use Cases of Daemonsets in Kubernetes?

Question
DaemonSets will bypass the scheduler and deploy to nodes that are designated as “unschedulable”; however you can use a DaemonSet to deploy to a subset of all the nodes (according to page 109 of Kubernetes in Action). In the real world, what are daemonsets used for in Kubernetes?

Answer

  • Monitoring of pods/nodes (such as Prometheus Node Exporter,

…

How Do You Parse a String in Bash?

Problem scenario
You want to count the number of “(” (open parens) in a string. How do you parse a string in Bash?

Solution
Remember to use awk. The -F flag can allow you to designate a character to count and the NF flag can count the occurrences.

echo “continualintegration” | awk -F “o” ‘{print NF-1}’

echo “c(ntinua((lintegrati(n” | awk -F “(” ‘{print NF-1}’

You may also want to see this posting parse an array.

…

What is Knowledge of Merging Strategies in the Context of Git?

Question
What are different merging strategies in the context of Git?

Possible Answers
“…branches are completely useless unless you merge them…” – Linus Torvalds

A branch is a set of files associated with a code base usually in a collection known as a repository. Atlassian says “[b]ranching is a feature available in most modern version control systems…”,

…

How Do You Fix a Carrier Thermostat That Is Blinking All Lights and Not Working?

Problem scenario
Your Carrier thermostat (e.g., a programmable Comfort (TM) Series Touch-n-Go (TM)) is not working. There is a glitch or apparent malfunction on the screen. All the lights flash on with the backlight turning on — then the display goes dark (unlit with no indication). The heating and cooling does not work. The batteries seem good; the thermostat showed them at two-thirds strength (two of three bars were strong).

…

How Do You Troubleshoot “mount: /foobar: must be superuser to use mount” when You Open a Terminal in Linux?

Problem scenario
When you open a terminal or log into a Linux server, you see a message like this:

“mount: /foobar: must be superuser to use mount.”

You suspect some bash script is running every time you log in. What should you do?

Possible solution #1
If you are running a Red Hat server, go to /etc/profile.d/.

…

Confused about Legal Policies for your Small Business?

Problem scenario
You run a website business. Where do you go to get an understanding about legal policies? You want to learn more about how to comply with Amazon’s Affiliate Marketing program’s policies. What do you do?

Solution
You can try termly.io for general policy information assistance. For Amazon’s Affiliate Marketing program specifically, see this external posting.

…

How Do You Troubleshoot Errors Such as “/lib64/libcurl.so.4: no version information available”?

Problem scenario
You try to run an obs command. You get errors like these:

var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: /lib64/libcurl.so.4: no version information available (required by /var/lib/snapd/snap/obs-studio/1195/usr/bin/obs)
/var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: symbol lookup error: /var/lib/snapd/snap/obs-studio/1195/usr/bin/obs: undefined symbol: obs_get_module_lib

What should you do?

Solution

  1. Back up the /lib64/libcurl.so.4 to a user’s home directory (just in case).
  2. Run this:
    sudo find / -name libcurl.so.4 | grep -i obs
  3. Copy one of the files found above to /lib64/

…