User Tools

Site Tools


linux

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
linux [2023/01/11 10:31] rogerlinux [2023/01/11 10:33] (current) – [Print the first column of a string] roger
Line 163: Line 163:
 </code> </code>
  
 +==== Print a full string in lowercase or uppercase ====
 +
 +<code bash>
 +echo "This Is A CaPiTaLiZeD String" | awk '{print tolower($0)}'
 +# Output: "this is a capitalized string"
 +
 +echo "This Is A CaPiTaLiZeD String" | awk '{print toupper($0)}'
 +# Output: "THIS IS A CAPITALIZED STRING"
 +</code>
linux.txt · Last modified: 2023/01/11 10:33 by roger