Skip to content

Commit 815bac6

Browse files
authored
Create wildcard-example.sh
1 parent 56bcc07 commit 815bac6

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

wildcard-example.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
3+
# Comment Single line
4+
5+
6+
echo -e "Directory a created \n"
7+
mkdir a
8+
9+
echo -e "Directory b created \n"
10+
mkdir b
11+
12+
echo -e "Directory b created \n"
13+
mkdir c
14+
15+
echo -e "Directory b created \n"
16+
mkdir d
17+
18+
echo -e "Creating 1.txt 2.txt 3.txt to a directory \n"
19+
touch a/1.txt a/2.txt a/3.txt
20+
21+
echo -e "listing of files in a directory "
22+
ls a/
23+
24+
echo -e "\n Copying file from a directory to b using cp (a/* b/) \n"
25+
cp a/* b/
26+
27+
echo -e "listing of files in b directory "
28+
ls b/
29+
30+
echo -e "\n removing all files from b directory using (rm -f /b*) \n"
31+
rm -f b/*
32+
33+
echo -e "listing of files in b directory "
34+
ls b/
35+
36+
echo -e "\n copying all files from a directory using extension ( cp a/*.txt c/) \n"
37+
cp a/*.txt c/
38+
39+
echo -e "listing of files in c directory "
40+
ls c/

0 commit comments

Comments
 (0)