Bash programming - Introduction: verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
(Nieuwe pagina aangemaakt met 'How to start programming in Bash, without prior programming experience? And making sure it will be fun? == Basics == * Shebang, script files, make files executabl...')
 
Regel 3: Regel 3:
 
== Basics ==
 
== Basics ==
  
* Shebang, script files, make files executable, terminal screen
+
* Shebang, script files, make files executable, terminal screen, editor (I use Sublime Text)
 
* Display ''Hello, world!''
 
* Display ''Hello, world!''
 
* Variables (scalars): Assigning & displaying
 
* Variables (scalars): Assigning & displaying
Regel 14: Regel 14:
 
* Functions
 
* Functions
 
* Evaluating commands
 
* Evaluating commands
 +
 +
== Specifc & personal things ==
 +
 +
* <code>ln</code>: To make shortcuts on the Desktop to whatever I often use
 +
* Edit
  
 
== Explore further yourself ==
 
== Explore further yourself ==

Versie van 30 jan 2023 09:19

How to start programming in Bash, without prior programming experience? And making sure it will be fun?

Basics

  • Shebang, script files, make files executable, terminal screen, editor (I use Sublime Text)
  • Display Hello, world!
  • Variables (scalars): Assigning & displaying
  • Receiving user input & processing it - E.g.: Ask the user for his/her name and displaying something like Hello, <name>!
  • Comparisons, e.g., check for empty imput and take appropriate actions
  • Flow control: Loops. E.g.: Display the numbers from 1 to 100 on the screen; With a step function; Backwards
  • Pipelining. E.g. ls > tmp.txt
  • Grep; Pipelining
  • Passing arguments to scripts
  • Functions
  • Evaluating commands

Specifc & personal things

  • ln: To make shortcuts on the Desktop to whatever I often use
  • Edit

Explore further yourself

Stuff I get energy from

  • WordPress: Update all prices with one small script
  • Remove whitespace around pictures with just one command
  • Using mmv to update lots of file names at once.

Sources