Skip to content

Done module-bash#2

Open
pinelli wants to merge 1 commit into
vpetrusenko:masterfrom
pinelli:finished
Open

Done module-bash#2
pinelli wants to merge 1 commit into
vpetrusenko:masterfrom
pinelli:finished

Conversation

@pinelli
Copy link
Copy Markdown

@pinelli pinelli commented Jun 12, 2018

No description provided.

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
@@ -0,0 +1,17 @@
#!/bin/bash
ls_out=$(ls -R | xargs -n1)
echo "$ls_out" > .assist
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 assist file creation, solution of this ex is more easy than your, one cycle and only one var

Comment thread ex03/ex03.sh
if [ -z $1 ]; then
exit 1
fi
touch .f
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.

The same, do it without file creation

Comment thread ex04/ex04.sh
#!/usr/bin/bash
if [ -z $1 ] || [ -z $2 ]; then
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.

again please do it without file creation

Comment thread ex05/ex05.sh
*)
;;
esac
echo "$res"
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 ex06/ex06.sh
eval "$com $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 ex07/ex07.sh
echo "$res"
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.

Test on 0 lines returns error and Test on 2 lines return empty string tests are failed

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
ten=$(grep -o "9" resources/digitfile.txt | wc -l)" nines"

echo $zer, $ones, $twos, $th, $ft, $fif, $six, $sev, $nin, $ten

Copy link
Copy Markdown
Owner

@vpetrusenko vpetrusenko Jun 21, 2018

Choose a reason for hiding this comment

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

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