-
Notifications
You must be signed in to change notification settings - Fork 295
/
Create_file.sh
32 lines (26 loc) · 1.07 KB
/
Create_file.sh
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
#!/bin/bash
Create a file in a specifi path and add some conent into that file.
echo "Your cuurent directory is "
pwd
read -p "Enter you desired location here" location
echo "Now your current location is "
cd $location
pwd
read -p "Enter a file name: " filename
read -p "Enter extenison you want for the file: " exe
read -p "How Many File You want to create?? " end_no
seq 1 $end_no | xargs -I {} touch $filename{}.$exe
ls
#for i in $(seq 1 $end_no);
#do
# touch "$filename-$i$exe"
#done
# -- CREATE USER readonly WITH ENCRYPTED PASSWORD 'bounce@readonly';
# -- GRANT USAGE ON SCHEMA public to readonly;
# -- ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly;
# GRANT CONNECT ON DATABASE baas_service to readonly;
# -- \c baas_service
# ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readonly; --- this grants privileges on new tables generated in new database "foo"
# GRANT USAGE ON SCHEMA public to readonly;
# GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO readonly;
# GRANT SELECT ON ALL TABLES IN SCHEMA public TO readonly;