User Tools

Site Tools


linux:bash

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux:bash [25/09/2024 15:20] – created - external edit 127.0.0.1linux:bash [21/05/2025 13:32] (current) – [Arrays] andrew
Line 1: Line 1:
 ====== Bash ====== ====== Bash ======
 +
 +[[bash-quickguide|Quick guide to shell scripts in BASH]] \\
 +[[bash-quotes|BASH Quotes examples]] \\
 +[[bash-getoptions|BASH Get Options]] \\
 +[[bash-post-to-api|POST to API with cURL]] \\
 +[[bashshortcut|BASH references and shortcuts]] \\
 +[[bash-snippets|BASH Snippets]] \\
 +[[bash_aaart|Ascii Art]] \\
 +
 +[[misc-bash-cgi|BASH cgi Misc info]] \\
  
 **What is BASH?** **What is BASH?**
Line 182: Line 192:
 ===== while loop ===== ===== while loop =====
  
-  while ($line = <SERIAL> +Multiline:
-  { + 
-      print "$line\n"; +  while [ condition ] 
-  +  do 
-  +    
 +      print "$SOMETHING\n"; 
 +    
 +  done 
 + 
 + 
 +On one line:- 
 +  while [ condition ]; do print "$SOMETHING\n"; done 
 + 
 ===== Time duration of operation and record exit status ===== ===== Time duration of operation and record exit status =====
  
Line 309: Line 328:
  
  
-===== Arrays =====+===== Arrays or Lists =====
  
 Bash array example, indices start at zero, so below [1] returns the second element ('example'):- Bash array example, indices start at zero, so below [1] returns the second element ('example'):-
linux/bash.1727277622.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki