Difference between revisions of "$1"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash
 
https://stackoverflow.com/questions/3601515/how-to-check-if-a-variable-is-set-in-bash
  [[if]] [ -n "$1" ]; then
+
  [[if]] [ [[-n]] "$1" ]; then
 
   echo "You supplied the first parameter!"
 
   echo "You supplied the first parameter!"
 
  else
 
  else

Revision as of 10:59, 3 November 2021

Advertising: