-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScripts_examples.sh
More file actions
executable file
·66 lines (39 loc) · 994 Bytes
/
Copy pathScripts_examples.sh
File metadata and controls
executable file
·66 lines (39 loc) · 994 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
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#Description:
#Author: Gahkaa P.
#Date:
# touch guru.txt
# chmod +x guru.txt
# echo "Enter value"
# read a
# echo "You enter ${a}"
# viewing environment variables
# echo "The value of the home variable is: "
# echo $HOME
# gab output and make it readable
# echo "The value of the pwd command is: $(pwd)"
# Assign command output to a variable.
a=$(uname -r)
# echo " The value of the output variable is: ${a}"
# View data on the command line
# echo "I saw $@ on the command line" OR "I saw ${@} on the command line"
# Concatenate user input with command output.
#echo "Enter a file extension:"
# read b
# touch "magicpen.${b}"
# chmod 775 magicpen.${b}
# Check to see if a file exists.
# c=$(/etc/passwd)
# if [ -d ${c} ]
# then
# echo "That file is there and a directory"
# else
# echo "Not there and Not a directory"
# fi
#OR
#if [-d $1 ]
#then
#echo "That file exists and a directory"
#else
#echo "That file does't exists and its a directroy"
#fi