Jackson  Watson

Jackson Watson

1625619970

The How? & Why? of the Double Dash (--) Delimiter on macOS, Linux, bash

Well if it isn’t our old frenemy, the double dash delimiter.
One of those things you encounter now and then that can really make you want to pull your hair out, but is super easy to use and understand once you know.

Join Beyond Code Bootcamp:
https://beyondcodebootcamp.com

#macos #linux #bash #double dash

What is GEEK

Buddha Community

The How? & Why? of the Double Dash (--) Delimiter on macOS, Linux, bash
Jackson  Watson

Jackson Watson

1625619970

The How? & Why? of the Double Dash (--) Delimiter on macOS, Linux, bash

Well if it isn’t our old frenemy, the double dash delimiter.
One of those things you encounter now and then that can really make you want to pull your hair out, but is super easy to use and understand once you know.

Join Beyond Code Bootcamp:
https://beyondcodebootcamp.com

#macos #linux #bash #double dash

Hire Dedicated Linux Developer

Looking to develop real-time applications?

Hire Dedicated Linux Developer from HourlyDeveloper.io, we have dedicated developers who have vast experience in developing applications for Linux and UNIX operating systems and have in-depth knowledge of their processes, kernel tools, internal architectures, and development packages.

Consult with experts:- https://bit.ly/2ZQ5ySP

#hire linux dedicated developer #linux developer #linux development company #linux development services #linux development #linux developer

How I Switched from Windows 10 to Linux Mint

This article is all about my journey on switching from Windows 10 to Linux Mint 20, how I got easily adapted to the Linux environment, and some resources that helped me to set up a perfect Desktop environment.

Uncertainty

Ok, now I have decided to switch to Linux but here comes the first question. Which distro will satisfy my needs both in terms of GUI and other aspects? Linux is not something new to me since I have been working with RHEL based distros in my work for the past 4 years with the command-line.

I know RHEL based distros are good for enterprises but not for personalized desktop environments, at least that’s what I am thinking till now. So I started my research to find the distro that should be easy for me to use and at the same time should have good community support if in case I ran into some problem. Among many Linux distros, I drilled down my list to 4 flavors.

Related ArticleThe Best Linux Distributions for Beginners

Before deciding the Distro it is necessary you formulate the list of tools/programs or packages needed and check if the distro you choose provides all those features.

For me, I use Linux for two main purposes: one is for my professional development work, writing articles, and second for my personal use like Video editing and Movies. Most of the popular software are created to be compatible with Windows, macOS, and Linux like Sublime TextVSCodeVLC Media PlayerFirefox/Chromium browser. Other than these software, cloud-based services make our life easy Like Microsoft Office 365 or G Suite.

#linux distros #linux mint #linux distros #linux mint tips #linux

Sheldon  Grant

Sheldon Grant

1668488605

What are Double Parentheses in Bash

What are Double Parentheses in Bash

“Brackets are important in any programming language to execute the program and get the desired outputs. In bash, we use single and double parentheses to perform different tasks through a script. However, many beginners and even intermediate bash users need to learn about double parentheses. So in this tutorial, we will briefly summarize what double parentheses are in bash.”

What are Double Parentheses in Bash

The “((..))” double parentheses are similar to the let command, which you can use to perform arithmetic calculations in a script. For example, let’s create a script that will perform various arithmetic calculations:

#!/bin/bash
echo "Please enter the values of A and B"
read A
read B
sum=$((A+B))
echo "Addition of $A and $B is $sum"

sub=$((A-B))
echo "Subtraction of $A and $B is $sub"

multiply=$((A*B))
echo "Multiplication $A and $B is $multiply"

division=$((A/B))
echo "Division of $A and $B is $division"

 

Once you run the above script, the terminal will ask you to enter two numbers, and then it will perform the calculations:

Similarly, you can use the following patterns of double parentheses styles to get the required results:

#!/bin/bash
echo "Please enter the values of A and B"
read A
read B
sum=$((A+B))
echo "Addition of $A and $B is $sum"

((sub=A-B))
echo "Subtraction of $A and $B is $sub"

num1=A
num2=B

((multiply=num1*num2))
echo "Multiplication $A and $B is $multiply"

division=$((num1/num2))
echo "Division of $A and $B is $division"

 

This script provides the same result as the previous one:


You can also use the [[ rather than [  because it is an advanced type that offers a ton of enhancements such as:

  • The [[ can efficiently handle the empty strings and some strings with the whitespace.
  • You can use || and && logical operators with [[ but not [ because single [ can’t pass || and && operator as a command-line argument.

Wrapping Up

This was all about the double parentheses in bash, which you can try to enhance the arithmetic calculations easily. We have explained various types of examples to perform arithmetic calculations by adding double parentheses. Bash contains a ton of concepts that you can learn to become a bash expert. So make sure you check out Linuxhint to read various tutorials of bash.

Original article source at: https://linuxhint.com/

#linux #bash #double 

I am Developer

1620616862

How to Delete Directories and Files in Linux using Command Line

In this remove or delete directories and files linux tutorial guide, you will learn how to remove empty directory and non empty directory linux using command line. And as well as how to remove/file files linux using command line.

If you work with Linux then you will need the following:

  • how to remove empty directory in linux,
  • how to remove non empty directory,
  • how to remove directory without confirmation linux
  • how to remove files with and without confirmation in linux.

So, this tutorial guide will show you you how to use the rmunlink, and rmdir commands to remove or delete files and directories in Linux with and without confirmation.

https://www.tutsmake.com/how-to-remove-directories-and-files-using-linux-command-line/

#how to delete directory in linux #how to remove non empty directory in linux #remove all files in a directory linux #linux delete all files in current directory #linux delete all files in a directory recursively #delete all files in a directory linux