User Tools

Site Tools


linux:bash

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:bash [11/04/2025 15:50] andrewlinux:bash [21/05/2025 13:32] (current) – [Arrays] andrew
Line 192: 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 319: 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.1744386655.txt.gz · Last modified: by andrew

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki