Skip to content

Commit 7c45735

Browse files
committedJan 22, 2019
improve some script
1 parent 2ff14ec commit 7c45735

File tree

7 files changed

+26
-64
lines changed

7 files changed

+26
-64
lines changed
 

‎README.md

100644100755
File mode changed.

‎scripts/color.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
DARKGRAY='\033[1;30m'
4+
RED='\033[0;31m'
5+
LIGHTRED='\033[1;31m'
6+
GREEN='\033[0;32m'
7+
YELLOW='\033[1;33m'
8+
BLUE='\033[0;34m'
9+
PURPLE='\033[0;35m'
10+
LIGHTPURPLE='\033[1;35m'
11+
CYAN='\033[0;36m'
12+
WHITE='\033[1;37m'
13+
DEFAULT='\033[0m'
14+
15+
COLORS=($DARKGRAY $RED $LIGHTRED $GREEN $YELLOW $BLUE $PURPLE $LIGHTPURPLE $CYAN $WHITE )
16+
17+
for c in "${COLORS[@]}";do
18+
printf "\r $c LOVE $DEFAULT "
19+
sleep 1
20+
done

‎scripts/colorfull.sh

-53
This file was deleted.

‎scripts/fibonacci.sh

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
#!/bin/bash
2-
echo "How many numbers do you want of Fibonacci series ?"
3-
read total
42
x=0
53
y=1
64
i=2
7-
echo "Fibonacci Series up to $total terms :: "
8-
echo "$x"
9-
echo "$y"
10-
while [ $i -lt $total ]; do
5+
while true ; do
116
i=$(expr $i + 1)
127
z=$(expr $x + $y)
13-
echo "$z"
8+
echo -n "$z "
149
x=$y
1510
y=$z
11+
sleep .5
1612
done

‎scripts/hello-world.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
echo "Hello World !"

‎scripts/hello.sh

-4
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)
Please sign in to comment.