chuj wie
- lokalne
local nazwa_zmiennej
- globalne
moze o to chodzi
ta druga czesc to chyba to samo co w nastepnym
PIPE: ls | grep .x
Argumenty: program.sh arg1 arg2 ...
https://www.geeksforgeeks.org/basic-operators-in-shell-scripting/
==
Operator : Double equal to operator compares the two operands. Its returns true is they are equal otherwise returns false.!=
Operator : Not Equal to operator return true if the two operands are not equal otherwise it returns false.<
Operator : Less than operator returns true if first operand is lees than second operand otherwse returns false.<=
Operator : Less than or equal to operator returns true if first operand is less than or equal to second operand otherwise returns false>
Operator : Greater than operator return true if the first operand is greater than the second operand otherwise return false.>=
Operator : Greater than or equal to operator returns true if first operand is greater than or equal to second operand otherwise returns false
- Addition (
+
): Binary operation used to add two operands. - Subtraction (
-
): Binary operation used to subtract two operands. - Multiplication (
*
) :Binary operation used to multiply two operands. - Division (
/
) :Binary operation used to divide two operands. - Modulus (
%
) :Binary operation used to find remainder of two operands. - Increment Operator (
++
) : Uniary operator used to increase the value of operand by one. - Decrement Operator (
–
) : Uniary operator used to decrease the value of a operand by one
- Logical AND (
&&
) : This is a binary operator, which returns true if both the operands are true otherwise returns false. - Logical OR (
||
) : This is a binary operator, which returns true is either of the operand is true or both the operands are true and returns false if none of then is false. - Not Equal to (
!
) : This is a uninary operator which returns true if the operand is false and returns false if the operand is true.
Opisz znane testy zmiennych lancuchowych (napisow). Podaj jakie wartosci zmiannych odpowiadaja true, a jakie false.
#!/bin/bash
false=0
true=1
((false)) && echo false
((true)) && echo true
((!false)) && echo not false
((!true)) && echo not true