CodeTryout
  Home Docker Ubuntu Webdriver Python VSCode VM Git PowerShell Bitbucket Bash Script Kubernetes MobaXterm DevOps

 Bash Script



40+ BASH commands for everyday use

40+ BASH commands for everyday use

ISO 8601 date format in bash shell script? yyyy-MM-dd T HH:mm:ss Z

Ho to get bash print date in ISO 8601 date format - yyyy-MM-dd T HH:mm:ss Z including UTC offset.

Bashrc Alias, what is it and how to use it?

A practical guide on how to use bashrc aliases

How to convert lowercase to UPPERCASE in a bash shell script built-in

Quick way to change lowercase to uppercase in bash, we are exploring a way using bash built in features, variable case conversion.

Bash script to check if file exists on a remote server

A practical script to check whether a file exists on a remote server using bash. The script connects using ssh and verify whether the file exists.

5 Examples for bash if else in shell script

bash scripting if then else statements. Explained with five sample codes and runtime demos.

Bash add the number of days to date OR get a specific future date

Explaining how to print a specific future date corresponding to the current date in bash, or any bash shell such as linux ubuntu or docker.

Bash date format print yyyymmddhhmmss milliseconds

Bash date print Year, Month, Day, Hour, Minute and Seconds

How to create a bash alias with arguments

How to create a bash alias with arguments, using aliases and functions

How to print the last command return code in bash?

How to get the return code of a command in bash. Also listing all reserved exit codes

How to print the day before yesterday date in bash shell script

Explaining how to get the date for day-before-yesterday in Linux Bash script

How to write STDOUT and STDERR to different files in bash scripts

How to write output and error messages to two different files in shell scripts.

Bash date print X days ago (Linux shell script or in command-line)

Bash date print X days ago (Linux shell script or in command-line)

How to get the current Unix timestamp or epoch time from a Linux command line

Explaining with examples how to get the current date timestamp or epoch time from a Linux command line, script or bash terminal

How to un-comment a line in a text file using sed matching a word (Linux command-line)

How to un-comment a line in a text file using sed by matching a specific word or character (Linux command-line)

Linux bash full date printing, how to print the full date Year-Month-Day?

Explaining how to print full date in bash using shortcode

How to grep for the pattern at the end of the line?

grep-ing pattern at the ending of a text file

How to grep for the pattern at the beginning of the line

grep-ing pattern at the beginning of a text file

How to remove spaces from a string variable in bash?

Quicly replaces multiple spaces from a string variable in bash. This works well in Linux, Bash, Docker containers, centos, rhel etc.

Linux bash until loop examples

This is an example script for shell script bash, until loop

Linux while true loop example in bash

Example script for shell script bash, while loop

Bash assign a default value to a variable if it is empty

Bash variable set a default value

bash tr-command to delete single or multiple characters

Examples for deleting multiple characters using tr command in bash.

The latest

  • 5 ways to checking the performance of Python code
  • Python, how to check a file exists?
  • How to execute a Program (or command) from a Python script?
  • Headless Chrome Selenium (–headless=new)
  • How to run Python on a Chromebook?
  • How to run rsync with dryrun option (–dry-run)
  • Rsync Incremental backup (with examples)
  • Python subprocess (Windows, Linux and MacOS examples)
  • Python Ansible example Playbook and execution
  • Python threading example [2 thread objects]
Codetryout.com is curating experiments with DevOps, Cloud Services, and Practical Coding examples.
© 2021 - 2023 Codetryout.com | Terms | About | Privacy | WordPress | Contact