Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

test

Comparing two strings in Bash

August 11, 2022 by Magenaut

I have the following if block in my bash script:

Categories Q&A, Unix & Linux Tags bash, shell-script, test Leave a comment

unix test when to use eq vs = vs == in test commands?

August 11, 2022 by Magenaut

When should I use -eq vs = vs ==

Categories Q&A, Unix & Linux Tags shell, test Leave a comment

Difference between ‘>’ and ‘-gt’

August 10, 2022 by Magenaut

What’s the difference between these:

Categories Q&A, Unix & Linux Tags shell, test Leave a comment

Checking if an input number is an integer

August 10, 2022 by Magenaut

I’m trying to check if an input is an integer and I’ve gone over it a hundred times but don’t see the error in this. Alas it does not work, it triggers the if statement for all inputs (numbers/letters)

Categories Q&A, Unix & Linux Tags bash, quoting, regular-expression, test Leave a comment

Is test or [ or [[ more portable both between bash shells and between other shells?

August 10, 2022 by Magenaut

I see I can do

Categories Q&A, Unix & Linux Tags portability, posix, shell, test Leave a comment

Testing if a variable is empty in a shell script

August 10, 2022 by Magenaut

I have seen the following technique used many times on many different shells, to test if a variable is empty:

Categories Q&A, Unix & Linux Tags portability, shell, shell-script, test Leave a comment

Starting with bash: -lt and -gt arguments

August 10, 2022 by Magenaut

I’m starting with bash and I found the following:

Categories Q&A, Unix & Linux Tags bash, shell, test Leave a comment

Usage of -n and -z in test built in – Bash

August 9, 2022 by Magenaut

Consider the following in bash:

Categories Q&A, Unix & Linux Tags bash, shell, shell-script, test Leave a comment

How exactly does “/bin/[” work?

August 9, 2022 by Magenaut

I am always surprised that in the folder /bin there is a [ program.

Categories Q&A, Unix & Linux Tags shell, test Leave a comment

Why is the ‘if [ $1=”1″ ]’ branch always selected even if $1 is not 1?

August 8, 2022 by Magenaut

I have a shell script named ‘teleport.sh’ like this:

Categories Q&A, Unix & Linux Tags bash, shell, test Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress