-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.sh
More file actions
128 lines (108 loc) · 3.52 KB
/
Copy pathscript.sh
File metadata and controls
128 lines (108 loc) · 3.52 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/bin/sh
clear
#DEFINED COLOR SETTINGS
RED=$(tput setaf 1 && tput bold)
GREEN=$(tput setaf 2 && tput bold)
STAND=$(tput sgr0)
BLUE=$(tput setaf 6 && tput bold)
cat << EOF
▒█▀▀█ ▀█▀ ▀▀█▀▀ ▒█░░▒█ ▀█▀ ▒█▀▀█ ▒█░▄▀ █ ▒█▀▀▀█
▒█▄▄▀ ▒█░ ░▒█░░ ▒█▒█▒█ ▒█░ ▒█░░░ ▒█▀▄░ ░ ░▀▀▀▄▄
▒█░▒█ ▄█▄ ░▒█░░ ▒█▄▀▄█ ▄█▄ ▒█▄▄█ ▒█░▒█ ░ ▒█▄▄▄█
▒█▀▀█ ▒█▀▀█ █░░ █░░█ █▀▀ ▒█▀▀█
▒█░░░ ▒█▄▄█ █░░ █░░█ ▀▀█ ▒█▄▄█
▒█▄▄█ ▒█░░░ ▀▀▀ ░▀▀▀ ▀▀▀ ▒█░░░
EOF
echo "+--------------------------------------------+"
echo "| Hello $USER"
echo "| Today is \c ";date
echo "| Number of user login : \c" ; who | wc -l
alias compile="g++"
alias help="nano help.txt"
echo "+--------------------------------------------+"
echo "| Choose one of the following options: |";
echo "| |";
echo "| 0. Open existing file. |";
echo "| 1. Open a new file and start writing code. |";
echo "| 2. Open help.{does nothing} |";
echo "| 3. Compile your file. |";
echo "| 4. Rename your compiled file |";
echo "| 5. Run your program. |";
echo "| 6. Make a new folder. |";
echo "| 7. Tansfer files to new folder |";
echo "| 8. Exit |";
echo "+--------------------------------------------+"
echo ""
read -p " Enter your choice: " choice
echo ""
if [ $choice = "0" ]; then
$cat > dia2
dialog --title "Ritwick's C++ Programming software" --backtitle "Welcome to Ritwick's \
C++" --msgbox "This is dialog box called msgbox, which is used\
to show some information on screen. Begin with Ritwick's C++\
software. Press any key. . . " 9 50
clear
echo ""
read -p "Enter name of file to open: " filemane
echo ""
echo $filemane
sudo vi $filemane
else
if [ $choice = "1" ]; then
read -p " Enter name of your file {abcd.cpp}: " filename
echo ""
nano $filename;
sh script.sh
else
if [ $choice = "2" ]; then
vi help.txt
sh script.sh
else
if [ $choice = "3" ]; then
read -p " Enter file name to compile: " ftc
g++ $ftc
sh script.sh
else
if [ $choice = "4" ]; then
echo "This will change compiled file name from a.out to userdefined";
read -p " Enter new name: " newname
mv a.out $newname
sh script.sh
else
if [ $choice = "5" ]; then
read -p "Enter program name to run: " runp
clear
echo " Output: ";
echo "+------------------+";
echo " ";
./$runp
echo ""
echo ""
echo ""
else
if [ $choice = "6" ]; then
echo "works"
read -p "Enter name of new folder: " folder
mkdir $folder
sh script.sh
else
if [ $choice = "7" ]; then
read -p "Enter name of the folder to transfer to: " folder2
cd $folder2
read -p "Enter name of files to transfer: " files
sudo cp $files $folder2
sudo cp script.sh $folder2
cd $folder2
rm -rv $files
else
if [ $choice = "8" ]; then
exit
fi
fi
fi
fi
fi
fi
fi
fi
fi