Lunch rand: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 14: | Line 14: | ||
4) Burger place | 4) Burger place | ||
5) Pizza up the street | 5) Pizza up the street | ||
6) delta" > e.tmp | 6) delta | ||
7) hugo" > e.tmp | |||
cat e.tmp | cat e.tmp | ||
echo | echo | ||
echo Your faith has been decided: | echo Your faith has been decided: | ||
odlucivalac=$((RANDOM % | odlucivalac=$(echo $((RANDOM % 7)) + 1 | bc) | ||
#echo $odlucivalac | #echo $odlucivalac | ||
head -$odlucivalac ./e.tmp | tail -1 | head -$odlucivalac ./e.tmp | tail -1 | ||
Revision as of 13:04, 31 January 2020
"""In preparation"""
This script will randomly decide where you should go for lunch:
- copy following text to blank file named ""lunch_rand.sh""
#! /bin/bash
echo Here are the choices where you can go for lunch: echo echo "1) URV 2) ICIQ 3) Chinos (across the street) 4) Burger place 5) Pizza up the street 6) delta 7) hugo" > e.tmp cat e.tmp echo echo Your faith has been decided: odlucivalac=$(echo $((RANDOM % 7)) + 1 | bc) #echo $odlucivalac head -$odlucivalac ./e.tmp | tail -1
- make ""lunch_rand.sh"" executable:
chmod +x curls.py
- to run script type:
./lunch_rand.sh
- now you can go for lunch