User Tools

Site Tools


sysadminery:sed

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
sysadminery:sed [2025/05/06 15:43] adamsysadminery:sed [2025/05/06 15:48] (current) adam
Line 5: Line 5:
      11:34:56 up 9 days,  3:24,  5 users,  load average: 3.08, 4.04, 14.66      11:34:56 up 9 days,  3:24,  5 users,  load average: 3.08, 4.04, 14.66
  
-and since i'm sure you forgot: load is "processes waiting for cpu time to execute", the 3 numbers are "in the last minute", "in the last 5 minutes", and "in the last 15 minutes". (i think). theoretically, if that number is less than the number of cores that you have, you have resources to spare for more.+and since I'm sure you forgot: load is "processes waiting for cpu time to execute", the 3 numbers are "in the last minute", "in the last 5 minutes", and "in the last 15 minutes". (i think). theoretically, if that number is less than the number of cores that you have, you have resources to spare for more.
  
-anyway, let's get one of those numbers. Here's the regular expression+anyway, let's get one of those numbers. Here's the regular expression one would expect:
  
 <code regex> <code regex>
Line 22: Line 22:
   * escape the brackets.   * escape the brackets.
   * there is no ''\d''.   * there is no ''\d''.
-  * don't escape the dot.+  * don't escape the dot, to literally match ''.''
   * escape the braces.    * escape the braces. 
-  * Now, outside of the brackets, don't escape the dot. You'll notice that not escaping the dot now does the opposite.+  * Now, outside of the brackets, don't escape the dot to match the wildcard character. You'll notice that not escaping the dot now does the opposite.
   * capture group 1 is not ''$1'', it's ''\1''.   * capture group 1 is not ''$1'', it's ''\1''.
sysadminery/sed.txt · Last modified: 2025/05/06 15:48 by adam