Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
M
my first project
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
joubran.mansour
my first project
Commits
88cb2c09
Commit
88cb2c09
authored
Jun 30, 2024
by
joubran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the second question
parent
04e9a770
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
second_Question
second_Question
+46
-0
No files found.
second_Question
0 → 100644
View file @
88cb2c09
THE SECOND QUESTION
joubran-VirtualBox:~ 1225 $ mkdir MyNEWFOLDER
joubran-VirtualBox:~ 1226 $ cd MyNEWFOLDER/
joubran-VirtualBox:~/MyNEWFOLDER 1227 $ touch file{1,2,3,4,5,6,7,8,9,10}_{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}
joubran-VirtualBox:~/MyNEWFOLDER 1229 $ find . -name "*x" -exec sed '1s/ /HelloLinux/g' {} \;
joubran-VirtualBox:~/MyNEWFOLDER 1229 $ cd
joubran-VirtualBox:~ 1230 $ touch creater.sh
joubran-VirtualBox:~ 1231 $ chmod u+x creater.sh
joubran-VirtualBox:~ 1232 $ nano creater.sh
joubran-VirtualBox:~ 1233 $ cat creater.sh
#!/bin/bash
for n in a b c d e f g h i j k l m n o p q r s t u v w x y z ;
do
if [ ! -d "$n" ]; then
mkdir $n
fi
done
joubran-VirtualBox:~ 1234 $ ./creater.sh
joubran-VirtualBox:~ 1235 $ touch mover.sh
joubran-VirtualBox:~ 1236 $ chmod u+x mover.sh
joubran-VirtualBox:~ 1237 $ nano mover.sh
joubran-VirtualBox:~ 1238 $ cat mover.sh
#!/bin/bash
for n in a b c d e f g h i j k l m n o p q r t s u v w x y z ;
do
if [ -d "$/home/joubran/NEWFOLDER/file{1,2,3,4,5,6,7,8,9,10}_$n" ]; then
mv /home/joubran/NEWFOLDER/file{1,2,3,4,5,6,7,8,9,10}_$n /home/joubran/$n
fi
done
joubran-VirtualBox:~ 1239 $ ./mover.sh
joubran-VirtualBox:~ 1240 $ find ./[abcdefghijklmnopqrtsuvwxyz] -name "*[34]*" -exec rm {} \;
joubran-VirtualBox:~ 1241 $ ls
2024-06-24 bin Desktop f it is my name month NEWFOLDER p search_result Videos
2024-06-28 Bin dimasympolic.out fold j mover.sh newww Pictures september w
a c directory folder5 k Music noexis projects t x
a_reports creater.sh Documents g l MyNEWFOLDER november Public Templates y
b d doo h m n o q tmp z
backups dd Downloads ham mansour new october r u
backup-test december e i mkdir newdir operating s v
joubran-VirtualBox:~ 1242 $ cd e
joubran-VirtualBox:~/e 1243 $ ls
file10_e file1_e file2_e file5_e file6_e file7_e file8_e file9_e
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