-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfirst_script.sh
More file actions
executable file
·56 lines (38 loc) · 847 Bytes
/
first_script.sh
File metadata and controls
executable file
·56 lines (38 loc) · 847 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Display your location in the filesystem
pwd
# Tests some commandes
echo "Shell script is awesome " > file.txt
cat file.txt | tr 'a-z' 'A-Z' > FILE.txt
# Define variables
# name=Superman
# bornOn="Crypton"
# AGE=167
# location='DC world'
# CHARACTERISTIC="strong"
# echo "
# I am $name, I'm bon on ${bornOn} and I'm $AGE years old and I lived in $location
# and I'm the ${CHARACTERISTIC}est man in the DC world
# "
# # Enter your first name . First way
# read LAST_NAME
# echo "Hello Mr $LAST_NAME"
# # Enter your firstname. Second way
# read -p 'Enter the username to create: ' LAST_NAME
# echo "Hello $LAST_NAME"
ARGS=2
case $ARGS in
1) # if ARGS=1
echo starting
;;
2) # if ARGS=2
echo stopping
;;
3) # if ARGS=2
echo restarting
;;
*)
echo don\'t know
;;
esac
echo "${UID}"