Skip to content

Commit

Permalink
list option ask which txt file to list
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnGavr committed Sep 17, 2020
1 parent 7e3687f commit 723c268
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions shelldio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,26 @@ while [ "$1" != "" ]; do
exit
;;
-l | --list )
welcome_screen
echo "Εμφάνιση όλων των σταθμών."
sleep 2
list_stations "$all_stations"
exit
welcome_screen
while true
do
if [ -f "$my_stations" ]; then
read -rp "Θέλετε να εμφανισθούν όλοι οι σταθμοί ή οι αγαπημένοι σας σταθμοί; (a=all | f=favourites):" list_choice
if [ $list_choice == "a" ]; then
echo "Εμφάνιση όλων των σταθμών:"
sleep 1
list_stations "$all_stations"
exit 0
elif [ $list_choice == "f" ]; then
echo "Εμφάνιση αγαπημένων σταθμών:"
sleep 1
list_stations "$my_stations"
exit 0
else
echo "Λάθος επιλογή"
fi
fi
done
;;
-a | --add )
welcome_screen
Expand Down

0 comments on commit 723c268

Please sign in to comment.