Skip to content
Open

ex02 #92

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ex01/hello_world.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bats
if [ -n "$1" ]; then
echo "Hello, $1!"
else
echo "Hello, World!"
fi
2 changes: 1 addition & 1 deletion ex01/hello_world_test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bats
#!/usr/local/bin/bats

@test "When given no name, it should greet the world!" {
run bash hello_world.sh
Expand Down
8 changes: 8 additions & 0 deletions ex02/ex02.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

input=$( echo $1 | tr "; " "\n" )

for i in $input
do
ls -R | grep -Fi $i || echo "the searched PATH is unexisting"
done