Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
undocumented_features [2015/04/02 08:36]
stummi created
undocumented_features [2015/04/02 11:28] (current)
stummi [C-Style codeblocks]
Line 1: Line 1:
 +====== Undocumented Features ======
 +
 Bash has some undocumented features. This Page aims to list all of them. Bash has some undocumented features. This Page aims to list all of them.
  
-====== ${var~~} ​======+===== ${var~~} =====
  
 Educated bash users may know the expansion ${var,} ${var,,}, ${var^} and ${var^^} to change a string or character to upper and lowercase. However there are also the undocumented expansions ${var~} and ${var~~}, which will inverse the case, meaning lowercase letters becoming uppercase and vice-versa. Educated bash users may know the expansion ${var,} ${var,,}, ${var^} and ${var^^} to change a string or character to upper and lowercase. However there are also the undocumented expansions ${var~} and ${var~~}, which will inverse the case, meaning lowercase letters becoming uppercase and vice-versa.
Line 13: Line 15:
 </​code>​ </​code>​
  
-====== declare -c var ======+===== declare -c var =====
  
 Declare has an undocumented -c flag, setting the variable to capcase, meaning the first character will always be uppercase while other ones will always be lowercase Declare has an undocumented -c flag, setting the variable to capcase, meaning the first character will always be uppercase while other ones will always be lowercase
Line 26: Line 28:
 </​code>​ </​code>​
  
-====== C-Style codeblocks ​======+===== C-Style codeblocks =====
  
-You can use brackets for defining code blocks after for, while, if, etc.+You can use brackets for defining code blocks after for:
  
 <​code>​ <​code>​
Line 38: Line 40:
  
 However, this syntax is deprecated and discouraged. However, this syntax is deprecated and discouraged.
-</​code>​ 
- 
  • undocumented_features.1427963770.txt
  • Last modified: 2015/04/02 08:36
  • by stummi