I am using SH shell and I am trying to compare a string with a variable’s value but the if condition is always execute to true. Why? Here is...
  • May 25, 2022
  • 0 Comments
I have gotten the following to work: for i in {2..10} do echo "output: $i" done It produces a bunch of lines of output: 2, output: 3, so on....
  • May 24, 2022
  • 0 Comments
What is the difference between =, == and -eq in shell scripting? Is there any difference between the following? [ $a = $b ] [ $a == $b ]...
  • May 24, 2022
  • 0 Comments
Lets say I have a shell / bash script named test.sh with: #!/bin/bash TESTVARIABLE=hellohelloheloo ./test2.sh My test2.sh looks like this: #!/bin/bash echo ${TESTVARIABLE} This does not work. I do...
  • May 24, 2022
  • 0 Comments