Bash Ka Introduction
Bash ek shell scripting language hai — yeh zyada tar Linux systems par interactive command line hai, aur ek language bhi hai scripts likhne ke liye jo wahi commands automate karte hain jo aap hand se type karte ho. Is site ki har dusri language se alag, Bash mein static type system bilkul nahi hota: har variable by default ek string hoti hai, aur kisi value ko number treat karna sirf kuch specific contexts mein matter karta hai, jaise arithmetic expressions ke andar.
Bash ki dusri defining feature hai exit code: har ek command — sirf functions nahi — ek status number return karke finish hoti hai, 0 se 255 tak. Convention ke mutabiq 0 ka matlab success hai aur kuch bhi aur failure, jo ek typed language mein boolean true ke kaam karne ke tareeke se bilkul opposite hai. Yeh course yeh sab cover karta hai, saath mein arrays, string manipulation ke liye parameter expansion, pipes aur redirection, aur woh strict-mode flags jo Bash ko mistakes ke liye kam forgiving banate hain.
Ek jhalak
Yeh hai ek real Bash script, jo is page ke apne interpreter par actually execute hua hai — koi mockup nahi:
echo "Bash: a shell scripting language -- interpreted, not compiled, with exit codes instead of typed return values."
Bash: a shell scripting language -- interpreted, not compiled, with exit codes instead of typed return values.
Sirf ek single command — koi function nahi, koi class nahi, pehle declare karne ko kuch nahi. Agla lesson aapki pehli full script run karta hai aur exactly explain karta hai ki kya ho raha hai.
Practice exercise
Exactly yeh print karo: Bash runs scripts, not programs.