<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=One_liners</id>
	<title>One liners - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=One_liners"/>
	<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=One_liners&amp;action=history"/>
	<updated>2026-05-03T12:50:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.6</generator>
	<entry>
		<id>https://plnx.nl/wiki/index.php?title=One_liners&amp;diff=20&amp;oldid=prev</id>
		<title>Pverha10: Created page with &quot;== sed ==  Replace all enters with spaces with sed. &lt;pre&gt; sed &#039;:a;N;$!ba;s/\n/ /g&#039; &lt;/pre&gt; &lt;br&gt; Replace all uppercase letters with lowercase with sed. &lt;pre&gt; sed -e &#039;s/\(.*\)/\L\1/&#039; &lt;/pre&gt;  The same with tr &lt;pre&gt; tr &#039;[:upper:]&#039; &#039;[:lower:]&#039; &lt;/pre&gt;  Get only the dashed mac addresses from a file &lt;pre&gt; grep -o &#039;..-..-..-..-..-..&#039; file &lt;/pre&gt;  == Powershell ==  One liner powershell command to uninstall the application &#039;Linphone&#039;. &lt;pre&gt; C:\windows\system32\WindowsPowerShell\v1.0...&quot;</title>
		<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=One_liners&amp;diff=20&amp;oldid=prev"/>
		<updated>2025-05-17T07:44:37Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== sed ==  Replace all enters with spaces with sed. &amp;lt;pre&amp;gt; sed &amp;#039;:a;N;$!ba;s/\n/ /g&amp;#039; &amp;lt;/pre&amp;gt; &amp;lt;br&amp;gt; Replace all uppercase letters with lowercase with sed. &amp;lt;pre&amp;gt; sed -e &amp;#039;s/\(.*\)/\L\1/&amp;#039; &amp;lt;/pre&amp;gt;  The same with tr &amp;lt;pre&amp;gt; tr &amp;#039;[:upper:]&amp;#039; &amp;#039;[:lower:]&amp;#039; &amp;lt;/pre&amp;gt;  Get only the dashed mac addresses from a file &amp;lt;pre&amp;gt; grep -o &amp;#039;..-..-..-..-..-..&amp;#039; file &amp;lt;/pre&amp;gt;  == Powershell ==  One liner powershell command to uninstall the application &amp;#039;Linphone&amp;#039;. &amp;lt;pre&amp;gt; C:\windows\system32\WindowsPowerShell\v1.0...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== sed ==&lt;br /&gt;
&lt;br /&gt;
Replace all enters with spaces with sed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed &amp;#039;:a;N;$!ba;s/\n/ /g&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Replace all uppercase letters with lowercase with sed.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sed -e &amp;#039;s/\(.*\)/\L\1/&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The same with tr&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
tr &amp;#039;[:upper:]&amp;#039; &amp;#039;[:lower:]&amp;#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get only the dashed mac addresses from a file&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep -o &amp;#039;..-..-..-..-..-..&amp;#039; file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Powershell ==&lt;br /&gt;
&lt;br /&gt;
One liner powershell command to uninstall the application &amp;#039;Linphone&amp;#039;.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -command &amp;quot;&amp;amp; {$app = Get-WmiObject -Class Win32_Product -Filter \&amp;quot;Name = &amp;#039;Linphone&amp;#039;\&amp;quot;; $app.Uninstall() }&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Actually a two liner, but this is to put your computer to sleep after 60 seconds from the commandline. Note: hibernate should be turned off for this.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
timeout 60&lt;br /&gt;
rundll32.exe powrprof.dll,SetSuspendState 0,1,0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Remove all files in the current directory older than 30 days.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
forfiles /D -30 /C &amp;quot;cmd /C attrib -s @file &amp;amp; echo @file &amp;amp; del @file&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clear all Windows Event Viewer logs.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wevtutil el | Foreach-Object {wevtutil cl “$_”}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pverha10</name></author>
	</entry>
</feed>