Move History

Fork Selected
  • Code
    #!/bin/bash
    
    echo Hello Bash!
    
    [ $# -ne 0 ] && echo "Hello, $1!" || echo "No parameters found."
    Test Cases
    # TODO: replace with your own tests (TDD). An example to get you started is included below.
    
    # run the solution and store its result
     output = run_shell args: ['Kumite']
    
     describe "Solution" do
       it "should return the argument passed in" do
         expect(output).to include('Hello Bash!')
       end
     end
  • Code
    • #!/bin/bash
    • echo Hello Bash!
    • if [ $# -ne 0 ]; then
    • echo "Hello, $1!"
    • else
    • echo "No parameters found."
    • fi
    • [ $# -ne 0 ] && echo "Hello, $1!" || echo "No parameters found."