Birmingham mumbai


hash bang , or  shebang



Download 15,21 Mb.
Pdf ko'rish
bet205/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   201   202   203   204   205   206   207   208   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

hash bang
, or 
shebang
. Basically, it just tells the kernel which 
interpreter to use in order to run the commands inside the script. There are other 
interpreters we could be using, such as 
#!/usr/bin/python
 if we were writing a 
script in the Python language. Since we're writing a Bash script, we used 
#!/bin/
bash
.
The lines that followed were simple print statements. Each one used a system 
variable, so you didn't have to declare any of those variables as they already existed. 
Here, we printed the current user's username, home directory, and default text 
editor.
The concept of scripting becomes more valuable when you start to think of things 
you do on a regular basis that you can instead automate. To be an effective Linux 
administrator, it's important to adopt the automation mindset. Again, if you are 
going to do a job more than once, script it. Here's another example script to help 
drive this concept home. This time, the script will actually be somewhat useful:
#!/bin/bash
sudo apt install -y apache2
sudo apt install -y libapache2-mod-php7.4
sudo a2enmod php7.4
sudo systemctl restart apache2


Boosting Your Command-line Efficiency

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   201   202   203   204   205   206   207   208   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish