-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupper
More file actions
38 lines (22 loc) · 901 Bytes
/
upper
File metadata and controls
38 lines (22 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# sysinfo_page - Script to give you compliments every 15 minutes to help you through your day. Change the list as you'd like.
h_info() {
echo Script that reads from "compliments.txt" in the same directory and interate through the compliments, displaying each as a notification. Can be cron\'d to show every 15 minutes.
echo
echo " Syntax: upper [-h]"
}
################### UPPER below #################
base=0
TARGET=/home/markian/bin/
cd $TARGET
num_comps=$(wc -l < compliments.txt)
n=4;#the variable that I want to be incremented
compliment=$(sed "${n}q;d" compliments.txt)
echo $compliment
$(zenity --notification --text="$compliment")
next_n=$[$n+1]
if [ $n -ge $num_comps ]; then
sed -i "/#the variable that I want to be incremented$/s/=.*#/=1;#/" ${0}
else
sed -i "/#the variable that I want to be incremented$/s/=.*#/=$next_n;#/" ${0}
fi