-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDoubleTerminal.sh
More file actions
executable file
·59 lines (46 loc) · 1.63 KB
/
DoubleTerminal.sh
File metadata and controls
executable file
·59 lines (46 loc) · 1.63 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
!#bash/bin
##### Constants
TITLE="System Information for $HOSTNAME:"
RIGHT_NOW=$(date +"%x %r %Z")
TIME_STAMP="Updated on $RIGHT_NOW by $USER"
COMMAND="tail -f output.txt"
echo $TITLE
echo $RIGHT_NOW
echo $TIME_STAMP
echo
echo -ne "\033]0;APRIL TAGS MAIN\007"
doubleterminal=false
if [ $# -gt 0 ]; then
echo -e "Your command line contains $# arguments"
else
echo "Your command line contains no arguments"
fi
echo
echo "You start with $# positional parameters"
echo
# Loop until all parameters are used up
while [ "$1" != "" ]; do
echo "Parameter 1 equals $1"
echo "You now have $# positional parameters"
if [ "$1" == "-h" ]; then
echo " -h : help"
echo " -d : double terminal"
elif [ "$1" == "-d" ]; then
doubleterminal=true
echo -e "\e[96m Double Terminal Activated \e[97m"
if [ "$doubleterminal" = true ]; then
#gnome-terminal -e 'tail -f output.txt'
#gnome-terminal -e 'rainbow --cyan="Time*" --yellow="Tags detected:*" --blink="Vel*" tail -f output.txt'
nohup xterm -hold -e 'rainbow --cyan="Time*" --yellow="Tags detected:*" --blink="Vel*" tail -f output.txt' &
nohup xterm -hold -e './build/bin/ThreadTest' &
#gnome-terminal -e './build/bin/StarTrackerInput'
./build/bin/AprilNav -S .401 -X Calibration/BlackCamera.txt -s
fi
else
echo -e "\033[31m $1 is Not an accepted argument, -h for accepted options \e[97m"
break
fi
# Shift all the parameters down by one
shift
done
#tail -f output.txt | sed --unbuffered -e "s/\(.*Time:*\)/\o033[96m\1\o033[39m/" -e "s/\(.*Tags detected.*\)/\o033[93m\1\o033[39m/"