-
Code 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
Output:
-
Code - #!/bin/bash
- echo Hello Bash!
if [ $# -ne 0 ]; thenecho "Hello, $1!"elseecho "No parameters found."fi- [ $# -ne 0 ] && echo "Hello, $1!" || echo "No parameters found."
- All
- {{group.name}} ({{group.count}})
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}