Python Pioneers: A Beginner's Guide ๐ช๐น pinned ยซFor new subscribers แจแแฃแแแ แจแฐแแญแแธแแ แตแแ
แญแถแฝ แแแแแต แจแแแแฝแ แแฐ แแญ scroll แ แญแ๐ยป
What's your passion?โก
Being a :
- Software engineer
- Computer scientist
- Web developer
Here you can create a smooth path to your goal by practicing with us.
#Quotes
@python_pioneers
@python_pioneers
Being a :
- Software engineer
- Computer scientist
- Web developer
Here you can create a smooth path to your goal by practicing with us.
#Quotes
@python_pioneers
@python_pioneers
๐9๐ฅฐ4๐4โค1
โกLET'S TEST OURSELVES WITH THIS QUESTIONโก
โWhich of the following lines of codes do this:
1. Enter in to a directory named storage
2. Create a folder named new_folder_1 and new_folder_2
3. Lists files in the directory including thier permission info
4. Remove directory new_folder_2
5. Go to the home directory
6. Exit from the terminal
a.
b.
``
c.
d.
``
โComment your answer.
โDon't hesitate to ask any questions related to our topic
#Questions
@python_pioneers
@python_pioneers
โWhich of the following lines of codes do this:
1. Enter in to a directory named storage
2. Create a folder named new_folder_1 and new_folder_2
3. Lists files in the directory including thier permission info
4. Remove directory new_folder_2
5. Go to the home directory
6. Exit from the terminal
a.
cd storage
mkdir new_folder_1
ls -l
rmdir new_folder_1
cd ..
exit
b.
``
shell
cd storage
makekdir new_folder_1 new_folder_2
ls -F
rmdir new_folder_2
cd ..
exit
``c.
cd storage
mkdir new_folder_1 new_folder_2
ls -l
rmdir new_folder_2
cd ..
exit
d.
``
shell
cd storage
mkdir new_folder_1 new_folder_2
ls -a
mkdir new_folder_2
cd ..
exit
``โComment your answer.
โDon't hesitate to ask any questions related to our topic
#Questions
@python_pioneers
@python_pioneers
๐2๐ฅฐ1
What is Shell Scripting?
Shell Scripting shell แ แ แฐแ แฐแจแฐแ แฐแจแณแณแญ แตแแแแฝแ แฅแแฒแแฝแ แจแแปแ แแฐแต แแแข
Shell operating system แแตแฅ command interpreter(แ แตแฐแญแแ) แแ, แแแณแ Bash in Unix-like systems.
It allows users to automate tasks, perform system administration, manipulate files and directories, and interact with the operating system through the command line interface.
แจแแฃแแแ commands execute แฅแซแจแแ แจแแ แจแ แฐแซ แ แฐแซ แฅแจแแแ แแ แญ แแ shell script แ แแ แแ the whole bunch of code in our script, sequence แ แฅแ execute แฅแแฒแแ แฅแแจแแแแแข
Getting started: Steps to write a shell script
#1. Choose a shellแก แ แฃแ แจแฐแแแฐแ Shell bash (Bourne Again Shell) แฒแแ แญแ แ แ แฅแ Unix-like systems แแญ default แแแข
#2. Setup your environmentแก Open a terminal or command prompt on your system.
#3. Script แแญแ แแแ แญแก Text editors like Vim, nano, or any other other text editor แ แแ แแ แ .sh extension แจแแซแแ script แแแ แญแฃ แแแณแ new_script.sh
Extension แแแแ แจfile name แแฅแ แจแแแฃ แจแแญแแ type แแญแ format แจแแแแจแ แจfile name part แแแข แแแณแ sample.txt แแญ แ แแจแจแป แซแแ .txt extension แจแแแแจแ แแญแ text file แฅแแฐแแ แแแข
#4. Set Permissions (Unix-like Systems): Make the script executable by running chmod +x new_script.sh.
...แญแแฅแแ
#ShellScripting
@python_pioneers
@python_pioneers
๐5โก3๐1
๐ฐ Latest Tech News:
New Breakthrough in Quantum Computing:
Scientists Achieve Stable Qubits at Room Temperature. This development marks a significant step towards practical quantum computers, with potential applications in cryptography, drug discovery, and more.
#QuantumComputing
#TechNews
@python_pioneers
New Breakthrough in Quantum Computing:
Scientists Achieve Stable Qubits at Room Temperature. This development marks a significant step towards practical quantum computers, with potential applications in cryptography, drug discovery, and more.
#QuantumComputing
#TechNews
@python_pioneers
๐6โก1๐ฅฐ1
๐ข Breaking News: Commercial Bank of Ethiopia (CBE) faced a system problem last night, resulting in service disruptions across branches, mobile banking, and internet banking.
The incident also led to a loss of funds. However, CBE has swiftly addressed the issue and resumed operations.
#CBE
#TechNews
@python_pioneers
The incident also led to a loss of funds. However, CBE has swiftly addressed the issue and resumed operations.
#CBE
#TechNews
@python_pioneers
๐ฑ4๐1๐1
๐ แแตแ แแแแฐ แจ10 แฅแญ แซแญแต! ๐
Be the first to provide the correct answer, and you'll win a 10 Birr card!
#meriaddis
#Questions
@python_pioneers
Be the first to provide the correct answer, and you'll win a 10 Birr card!
#meriaddis
#Questions
@python_pioneers
๐2๐1
Time is Up, แแต แจPython Pioneers แคแฐแฐแฆแฝ๐ฅ๐ฅ๐ฅ
๐2๐ฅฐ2
1. From the first two lines แจแแแจแณแ แแแญ 6 แฎแฑ แแตแฅ แฅแแฐแแ แแ
2.From line 4, 8 แตแญแญแแ แแฅแญ แตแแแแ the only right and correctly placed number is 2
3.From line 3 since 6 is not one of the numbers, the two correct numbers are 2 and 0 but wrongly placed
4.Because we know the correct place of 2, 0 must be placed in the first box
5.finally, แแแจแ แจแแแแ แแ แแฅแญ แแแแ we will see the 2nd line, from this since 6 is not correct. 1 or 4 can be correct.
From this assumption 4 must be the middle number because the number 1 can't be the right number while it is wrongly placed in line 2.
So the correct numbers or code is : 042
The winner is : @Moon4046
#Answer
@python_pioneers
2.From line 4, 8 แตแญแญแแ แแฅแญ แตแแแแ the only right and correctly placed number is 2
3.From line 3 since 6 is not one of the numbers, the two correct numbers are 2 and 0 but wrongly placed
4.Because we know the correct place of 2, 0 must be placed in the first box
5.finally, แแแจแ แจแแแแ แแ แแฅแญ แแแแ we will see the 2nd line, from this since 6 is not correct. 1 or 4 can be correct.
From this assumption 4 must be the middle number because the number 1 can't be the right number while it is wrongly placed in line 2.
So the correct numbers or code is : 042
The winner is : @Moon4046
#Answer
@python_pioneers
๐5
แแฌ แจShell Scripting แแฃแญ lesson แญแแจแแแข
แฅแแณแซแแแฃแฝแโค๏ธ
@python_pioneers
แฅแแณแซแแแฃแฝแโค๏ธ
@python_pioneers
๐2
แ แตแต subscribers แแฐ แแญ scroll แ แแจแ แจแแฃแแแ แจแฐแแญแแธแแ แตแแ
แญแถแฝ แแแแต แตแฝแแแฝแ๐
๐5
Python Pioneers: A Beginner's Guide ๐ช๐น pinned ยซแ แตแต subscribers แแฐ แแญ scroll แ แแจแ แจแแฃแแแ แจแฐแแญแแธแแ แตแแ
แญแถแฝ แแแแต แตแฝแแแฝแ๐ยป
This media is not supported in your browser
VIEW IN TELEGRAM
More On Shell Scripting
แจvideoแแ แแฅแซแชแซ แจแแฃแญ post แแแแต แตแฝแแแฝแ ๐๐๐๐
#ShellScripting
@python_pioneers
@python_pioneers
แจvideoแแ แแฅแซแชแซ แจแแฃแญ post แแแแต แตแฝแแแฝแ ๐๐๐๐
#ShellScripting
@python_pioneers
@python_pioneers
More On Shell Scriptingแฃแแแ แฅแแณแจแแ แจshell scripting แแ purpose tasks automate แแแจแ แแแข แแแตแ commands แ แแต แ แ แแต แฅแจแแแ terminal แแญ execute แจแแจแ แ แ แแด script แฅแแ แแ แตแ แฐแต/ bug แฅแตแจแแแ แต แตแจแต every lines will be executed one after the other.
แแแณแ แก
แ แแต "Hello, Ethiopia!" แฅแ terminal แแญ print แจแแซแจแ แจshell script แฅแแแแฃ แแ แแฐแฑแ แแแจแณแต แจแแญ แซแแแ แ แญแญ video แฐแแแจแฑแข
1. แ แแแแชแซ text editor แฅแแจแแณแแ (such as nano, vim, or gedit) and hello.sh แจแฐแฃแ file แฅแแแฅแซแแแข แฅแแ video แแญ แจแฐแ แแแแ text editor nano แแแข
nano hello.shแจแ แแญแ แแตแฅ แฅแแแ แ แแแฎแฝ แฅแแ แแแ
#!/bin/bash#line_1 "#!/bin/bash" /shebang line/ แฅแแ แจแแญ แจแแแแ scriptu แ bash shell interpreter execute แฅแแฒแแแแ แแ แข
# This is a comment
echo "Hello, Ethiopia!"
แ programming comment แจแแแแ a text still in the code yet not executed, แ shell Scripting comment แแแ แจแแแแ textun แ "#" แฅแแแแซแแแข
แแแณแ the 2nd line of our script does nothing because it is a comment.
Interpreter แจแแแแ itself is a program that translates and executes code written in a high-level programming language in to machine code(which is understandable by the computer).
2. แจแ แ แแ we will save our hello.sh script file.
nano แจแแตแ แแ แจแแ แแแแชแซ แแญ "CTRL - O" to save the file then "CTRl - X" to exit from the text editor.
3. แ แแฃแญ แจแแแจแแ script แแญแแ executable แแจแ แแ: แแญแ permission แแตแ แต แแ for the file to be executed.
แตแ file permission แ แแฃแญ แฅแแแซแแ but for now just do this.
chmod +x hello.sh4. แ แแจแจแป แจแแจแ แแแญ scriptun run แแจแ แแแฃ to do this:
./hello.shแญแ script run แตแแจแแ bash interpreter แ แแ แแ the code runs and a text "Hello, Ethiopia!" is printed in our terminal, this was done by the command "echo".
แญแ แแแ แแณแ แแ แแแฝ แฎแถแฝแ แ แแแ shell Scripting แฐแแแแฑแข
#ShellScripting
#PythonPioneers
@python_pioneers
@python_pioneers
@python_pioneers
๐3๐ฅ2