Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
P
proj1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
laila.alabdullah
proj1
Commits
8c2379ee
Commit
8c2379ee
authored
Jun 30, 2024
by
laila.alabdullah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add files_1to10_atoz.sh
parents
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
files_1to10_atoz.sh
files_1to10_atoz.sh
+46
-0
No files found.
files_1to10_atoz.sh
0 → 100755
View file @
8c2379ee
#!/bin/bash
#step1
cd
$HOME
mkdir
files
cd
files
#step2
touch
file
{
1..10
}
_
{
a..z
}
#step3
for
f
in
*
x
;
do
echo
"Hello Linux"
>>
"
$f
"
done
#step4
mkdir
{
a..z
}
find
-name
"file*a"
-exec
mv
{}
a
\;
2> /dev/null
find
-name
"file*b"
-exec
mv
{}
b
\;
2> /dev/null
find
-name
"file*c"
-exec
mv
{}
c
\;
2> /dev/null
find
-name
"file*d"
-exec
mv
{}
d
\;
2> /dev/null
find
-name
"file*e"
-exec
mv
{}
e
\;
2> /dev/null
find
-name
"file*f"
-exec
mv
{}
f
\;
2> /dev/null
find
-name
"file*g"
-exec
mv
{}
g
\;
2> /dev/null
find
-name
"file*h"
-exec
mv
{}
h
\;
2> /dev/null
find
-name
"file*i"
-exec
mv
{}
i
\;
2> /dev/null
find
-name
"file*j"
-exec
mv
{}
j
\;
2> /dev/null
find
-name
"file*k"
-exec
mv
{}
k
\;
2> /dev/null
find
-name
"file*l"
-exec
mv
{}
l
\;
2> /dev/null
find
-name
"file*m"
-exec
mv
{}
m
\;
2> /dev/null
find
-name
"file*n"
-exec
mv
{}
n
\;
2> /dev/null
find
-name
"file*o"
-exec
mv
{}
o
\;
2> /dev/null
find
-name
"file*p"
-exec
mv
{}
p
\;
2> /dev/null
find
-name
"file*q"
-exec
mv
{}
q
\;
2> /dev/null
find
-name
"file*r"
-exec
mv
{}
r
\;
2> /dev/null
find
-name
"file*s"
-exec
mv
{}
s
\;
2> /dev/null
find
-name
"file*t"
-exec
mv
{}
t
\;
2> /dev/null
find
-name
"file*u"
-exec
mv
{}
u
\;
2> /dev/null
find
-name
"file*v"
-exec
mv
{}
v
\;
2> /dev/null
find
-name
"file*w"
-exec
mv
{}
w
\;
2> /dev/null
find
-name
"file*x"
-exec
mv
{}
x
\;
2> /dev/null
find
-name
"file*y"
-exec
mv
{}
y
\;
2> /dev/null
find
-name
"file*z"
-exec
mv
{}
z
\;
2> /dev/null
#step5
find
-name
"file[3,4]_*"
-exec
rm
{}
\;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment