File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
linux_training_academy/shell_scripting_sccuintly Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash -x
2
+
3
+ # ##################Three#################################
4
+
2
5
# echo 'Shell Scripting is Fun!'
3
6
4
7
# var='Shell Scripting is Fun!'
7
10
# hname=$(hostname)
8
11
# echo "This script is running on ${hname}."
9
12
10
- # ######################################################
13
+ # #######################Four ###############################
11
14
12
15
# FILEPATH="/etc/shadow"
13
16
# if [ -f "$FILEPATH" ]; then
19
22
# fi
20
23
# fi
21
24
22
- # ######################################################
25
+ # #######################Five ###############################
23
26
24
27
# text=( man bear pig dog cat )
25
28
# for i in "${text[@]}"
31
34
# do
32
35
# echo $i
33
36
# done
34
- # ######################################################
37
+ # #########################Six #############################
35
38
36
39
# read -p "Enter a file or directory path: " filename
37
40
# if [ -f "$filename" ]; then
42
45
# echo "Other type of file."
43
46
# fi
44
47
45
- # ######################################################
48
+ # #######################Seven ###############################
46
49
47
50
# if [ $# -ne 1 ]; then
48
51
# echo "Expect only one argument as path to a file/dir."
58
61
# echo "Other type of file."
59
62
# fi
60
63
61
- # ######################################################
64
+ # #########################Eight #############################
62
65
63
66
if [ $# -eq 0 ]; then
64
67
echo " Expect atleast one argument as path to a file/dir."
You can’t perform that action at this time.
0 commit comments