Topics
Bash
About this topic: Articles tagged __TAG__
Showing 218 articlesRelated tags
Topics
Articles
Showing 218 articles
How-tos
How to Sum a List of Numbers in a Text File Using Bash
This article is a short tutorial on how to sum a list of numbers in a text file using Bash scripting. Learn effective methods such as using awk, paste with bc, and loops to …
↗
How-tos
How to Run find -exec Command in Bash
This article explores how to effectively use the find command with the -exec option in Bash. Learn to search for specific text in files and execute commands on found files. …
↗
How-tos
How to Solve Syntax Error Near Unexpected Token Newline in Linux Bash
Diagnose Bash's syntax error near unexpected token newline by inspecting the reported line, redirections, quotes, grouping, and line continuations, then verify the fix.
↗
How-tos
How to Check if a Variable Has a Value in Bash
This tutorial will discuss checking if a variable contains a value in Bash.
↗
How-tos
How to Perform Increment and Decrement Operation in Bash
Learn how to perform increment and decrement operations in Bash with our comprehensive guide. Discover various methods including arithmetic and unary operators, complete with clear …
↗
How-tos
How to Cat EOF in Bash
Learn how to use cat EOF in Bash effectively. This comprehensive guide covers the basics of cat EOF, including file creation, appending text, and writing scripts directly from the …
↗
How-tos
How to Declare and Utilize Booleans in Bash
Learn how Bash represents Boolean-like state, how command exit statuses work, and how to use safe conditions, integer flags, logical operators, functions, and loops.
↗
How-tos
How to Solve Export Not a Valid Identifier Error in Bash
Learn why Bash reports that an exported name is not a valid identifier, how to fix spaces around assignments and invalid names, and how to check a scalar in a child command.
↗
How-tos
Multi-Dimensional Array in Bash
Learn two ways to represent a two-dimensional table in Bash: a flat indexed array and an associative array.
↗
How-tos
How to Generate Random Number in Bash
Learn practical ways to generate random values in Bash with $RANDOM, shuf, /dev/urandom, awk, and a reusable bounded-integer function.
↗
How-tos
How to Assign Default Value in Bash
Learn how Bash parameter expansion supplies or assigns fallback values, how unset and empty variables differ, and when an if statement is a better fit.
↗
How-tos
How to Create Directory in Bash
This article demonstrates how to create a folder if it doesn't already exist in Bash.
↗
How-tos
How to Remove a File Extension in Bash
Remove a filename's final extension in Bash, use basename for a known suffix, or use cut to extract delimited text.
↗
How-tos
How to Open HTML File Using Bash
Learn how to open an existing HTML file from Bash on macOS or Linux. On macOS, use open for the default application or open -a to choose an installed browser; on Linux, xdg-open …
↗
How-tos
How to Run GDB in a Bash Script
Compile a C program with debugging symbols, run it under GDB from Bash, pass program arguments, and automate debugging commands.
↗
How-tos
Fix `bash: make: command not found` in Cygwin
Fix `bash: make: command not found` in Cygwin by installing the `make` package with the setup program or an existing apt-cyg installation.
↗
How-tos
How to Check if a File Is Empty in Bash
This article demonstrates different methods for checking if a file is empty in Bash.
↗
How-tos
How to Create Multi-Line String in Bash
Learn five ways to create multiline text in Bash and write it to a file with a here-document, a variable, printf, and two echo approaches.
↗
How-tos
How to Change Directory With Git Bash
Change directories in Git Bash with cd. Check your location with pwd, navigate with relative or Windows drive paths, quote folder names with spaces, and use Tab completion.
↗
How-tos
How to Check Whether a Bash Variable Is Empty
Learn four Bash ways to test a variable for an empty string, including safe quoting and how unset and whitespace-only values behave.
↗
How-tos
How to Check if Input Argument Exists in Bash
This tutorial describes checking if a script user has passed an input argument to a Bash script.
↗
How-tos
How to Remove First Character From String in Bash
Learn three ways to remove the first character from a string in Bash, including native parameter expansion, sed, and cut.
↗
How-tos
How to Read a File Line by Line Using Bash
Learn how to read a file line by line using Bash with our comprehensive guide. We explore various methods including the read command in loops and the mapfile command. Enhance your …
↗
How-tos
How to Split String Into Variables in Bash
Split a delimited string into Bash variables with cut, IFS and read, sed, or regular-expression matching.
↗
No articles found
Try clearing the filters.