Skip to content

Bash completed#4

Open
oyershov wants to merge 19 commits into
vpetrusenko:masterfrom
oyershov:master
Open

Bash completed#4
oyershov wants to merge 19 commits into
vpetrusenko:masterfrom
oyershov:master

Conversation

@oyershov
Copy link
Copy Markdown

No description provided.

@vpetrusenko
Copy link
Copy Markdown
Owner

Please stash everything into one commit

Comment thread ex01/hello_world.sh
echo "Hello, $1!"
else
echo "Hello, World!"
fi
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex02/ex02.sh
for i in $str
do
ls -R | grep -Fi $i || echo "the searched PATH is unexisting"
done
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex03/ex03.sh
awk -F: '{print $1}' .f
done
rm .f
fi
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do it without file creation

Comment thread ex04/ex04.sh
fi

echo $2 | cut -d'/' -f 2
grep -in $1 $2 | cut -d : -f 1
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No args and Without first arg tests are failed

Comment thread ex05/ex05.sh
summ=$(echo $(( "$summ / $#" )))
fi

echo "$summ"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two flags input test are failed, also please rewrite it with switch statement

Comment thread ex06/ex06.sh

if [ $1 ]; then
map $@
fi
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex07/ex07.sh
echo "$answer"
else
echo ''
fi
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex09/ex09.sh
grep -Po '(^|\t)[A-Za-z0-9\.]+@[A-Za-z0-9\.]+\.[A-Za-z0-9\.]+' $2
else
exit 1
fi
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex10/ex10.sh
for i in $@
do
echo "$(awk 'END{print NR}' $i) $i"
done
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Comment thread ex08/ex08.sh
answer+=$(grep -o "$i" $1 | wc -l)
answer+=" ${words[$i]}, "
done
echo "$answer" | sed 's/..$//'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants