Last active
          June 24, 2025 08:52 
        
      - 
      
- 
        Save mitchallen/21b1ec7256fb8dab4e8b05744d280df8 to your computer and use it in GitHub Desktop. 
    A simple shell script
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| if [ -z "$1" ]; then | |
| echo "Hello from a shell script!" | |
| else | |
| echo "Hello, $1!" | |
| fi | |
To pass an argument, you need to wrap it in something like bash:
bash <(curl -fsSL https://gist.githubusercontent.com/mitchallen/21b1ec7256fb8dab4e8b05744d280df8/raw/run.sh) "Alice"
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
To run this file via curl:
curl -fsSL https://gist.githubusercontent.com/mitchallen/21b1ec7256fb8dab4e8b05744d280df8/raw/run.sh | sh