About 491,000 results
Open links in new tab
  1. Programs for printing different patterns in Bash - GeeksforGeeks

    Jun 10, 2022 · Given the number N which represents the number of rows and columns, print the different following patterns in Bash. ##### Use nested loop to print the given pattern. The first …

  2. Pattern Matching (Bash Reference Manual)

    3.5.8.1 Pattern Matching. Any character that appears in a pattern, other than the special pattern characters described below, matches itself. The NUL character may not occur in a pattern. A …

  3. Pattern Matching In Bash - Linux Journal

    Apr 15, 2019 · The bash man page refers to glob patterns simply as "Pattern Matching". First, let's do a quick review of bash's glob patterns. In addition to the simple wildcard characters that are …

  4. linux - Bash script pattern matching - Stack Overflow

    Jun 22, 2017 · Bash glob pattern matching [0-9] can be used to match digit: if [[ $var1 == *,123[0-9][0-9][0-9],* ]] ; then echo "Pattern matched"; fi Alternatively, you can use regex pattern …

  5. Mastering Pattern Matching in Bash – TheLinuxCode

    Nov 3, 2023 · Pattern matching is an essential concept for working with files, paths, and strings in Bash shell scripts. Whether you need to find files by name, match text against a format, or …

  6. Pattern Matching in Bash - Delft Stack

    Jan 30, 2023 · Pattern matching is a powerful feature in Bash that allows you to compare strings against patterns to find matches or perform actions based on the comparison result. This can …

  7. Test if there are files matching a pattern in order to execute a script

    With zsh, the test for are there files matching a pattern can be written using an anonymous function and the N (for nullglob) and Y1 (to stop after the first find) glob qualifier: do-something.

  8. bash script to find pattern in text file and return entire line

    Many grep implementations, including GNU grep and BSD grep (but not including busybox!), can do both the file-finding and pattern-searching: grep -rn --include='*.txt' 'search string' ( -r : …

  9. bash - Read lines and match against pattern - Unix & Linux

    Here's a quickie for you, simply what we're doing is. Line 1: While reading file into variable line. Line 2: Match a regex, echo the $line if matching the word "bird" echo that line. Do whatever …

  10. Different Types of Patterns in shell script – Home

    Aug 14, 2019 · Her in this version of our post we are going to see some tricky patterns in linux shell script or bash programming. I hope the code I have made for this pattern program is surly …