Horje
awk if else statement Code Example
awk if else statement
# Basic syntax:
awk 'BEGIN {if(condition) outcome}' # if
awk 'BEGIN {if(condition_1) outcome_1; else outcome_2}' # if else
awk 'BEGIN {if(condition_1) outcome_1; else if(condition_2) outcome_2}' # if else if

# Example usage:
awk 'BEGIN {if(2>3) print "1_is_true"; else print 6}'
--> 6

# For multi-line and ternary operator syntax, see source




Shell

Related
wine install ubuntu Code Example wine install ubuntu Code Example
show ip address linux Code Example show ip address linux Code Example
generate password linux Code Example generate password linux Code Example
show all git configurations and their source/origin Code Example show all git configurations and their source/origin Code Example
bash remove trailing whitespace from every line Code Example bash remove trailing whitespace from every line Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12