What Does Bash “set -x” do?

What Does Bash "set -x" do?

Bash provides the set command in order to enable or disable different features. The set -x command is used to debug bash script where every executed statement is printed to the shell for debugging or troubleshooting purposes. The set -x command can be directly executed in an interactive bash shell or can be used inside … Read more

What Does “set -e” In Bash?

What Does "set -e" In Bash?

Linux bash provides a very good programming environment where scripts and functions can be created and executed. If there is an error related to a script file or function bash ignores these errors by default. But if we rely on the script or function execution and get detailed information about the result the set -e … Read more

Bash set Command Tutorial

Bash set Command Tutorial

Bash shell provides different builtin commands to manage the bash environment. The set command is used to manage some flags and characteristics of the bash environment. The set command can be used to change different parameters of the bash shell environment and customized for different cases and users. set Command Help The set command provides … Read more

Linux Bash Array Tutorial

Linux Bash Array Tutorial

Linux bash provides programmatic features like arrays. Bash array is a useful feature that can be used to store multiple items in a single variable. The bash array can be used to store multiple items and iterate them to read with loops. Different programming languages provide the array or list feature but the bash array … Read more

How To List Docker Containers?

How To List Docker Containers?

Docker is a popular containerization tool. By using docker a lot of containers can be created easily in a short time. But one of the most popular problems is how can be list docker containers. A docker container can be in different states like running, stopping, etc. In this tutorial, we examine how to list … Read more

How To Copy Directory In Linux?

How To Copy Directory In Linux?

Linux provides directories in order to store other directories and files. One of the most popular daily tasks is copying directories and their contents. The cp command can be used to copy directories in Linux. But there are different ways to copy directories like recursive, preventing overwrite, interactive, etc. Copy Directory with cp Command The … Read more

Scp From Remote To Local

Scp From Remote To Local

The scp command is used to copy files and directories over the network in a secure way. As a command files can be copied via the command-line interface. The scp name comes from Secure Copy . The scp command is provided by most of the Linux distributions can be used to copy from the remote … Read more

How To Check If A File Exist In Bash?

How To Check If A File Exist In Bash?

Linux bash provides a lot of built-in commands in order to execute different tasks. There are different commands and tools which can be used to check if a file exists. The file existence can be checked with different commands like test . Also, these bash methods can be used inside bash scripts in order to … Read more

Linux cp Command Tutorial

Linux cp Command Tutorial

Linux distributions provide the cp command in order to copy files and directories. The name cp comes from the copy. The cp command can be used to copy single or multiple files and folders in a recursive manner by including the child files and directories. cp Command Syntax The cp command syntax is like below. … Read more