<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>bash on Christian Knedel</title>
    <link>https://www.christian-knedel.de/zh/tags/bash/</link>
    <description>Recent content in bash on Christian Knedel</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Sun, 04 Apr 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.christian-knedel.de/zh/tags/bash/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>小故事：用xDoTools和xClip进行桌面控制</title>
      <link>https://www.christian-knedel.de/zh/post/2021/april/20210404-xdotools-xclip/</link>
      <pubDate>Sun, 04 Apr 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/zh/post/2021/april/20210404-xdotools-xclip/</guid>
      <description>在本教程中，我展示了如何通过Bash控制Linux&amp;ndash;桌面。Bash机器人需要以下软件包。 x  &amp;ndash;  +   Terminal   $ apt-get install xdotool xclip   之后，你可以使用所有的xdotool命令，比如说。
#!/bin/bash #mouse bewegen xdotool mousemove 100 200 #Mouse - Koordinaten erfassen xdotool getmouselocation #Mouse-klick xdotool click 1 Mouse-Klick auf Koordinaten xdotool mousemove 100 200 click 1 #usw... 在下面的例子中，Firefox窗口被搜索到，一个新的标签被打开，上面是Ubuntu的地址。
WID=$(xdotool search firefox | head -n1) ## Window-ID von Firefox ermitteln xdotool windowactivate $WID xdotool key &amp;quot;ctrl+t&amp;quot; ## neuen Reiter öffnen xdotool key &amp;quot;ctrl+l&amp;quot; ## Fokussieren der Adressleiste xdotool type --delay 100 &amp;quot;ubuntuusers.</description>
    </item>
    
    <item>
      <title>树莓派：PI CPU的无热性</title>
      <link>https://www.christian-knedel.de/zh/post/2020/february/20200214-rpi-cpu-temp/</link>
      <pubDate>Fri, 14 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/zh/post/2020/february/20200214-rpi-cpu-temp/</guid>
      <description>如果你想在某个温度下关闭树莓，那么你就来对地方了。我有一个脚本，通过Crontab检查CPU温度。
#!/bin/sh # This script reads the Broadcom SoC temperature value and shuts down if it # exceeds a particular value. # 80ºC is the maximum allowed for a Raspberry Pi. # Get the reading from the sensor and strip the non-number parts SENSOR=&amp;quot;`/opt/vc/bin/vcgencmd measure_temp | cut -d &amp;quot;=&amp;quot; -f2 | cut -d &amp;quot;&#39;&amp;quot; -f1`&amp;quot; # -gt only deals with whole numbers, so round it. TEMP=&amp;quot;`/usr/bin/printf &amp;quot;%.</description>
    </item>
    
    <item>
      <title>生成PDF页面概述</title>
      <link>https://www.christian-knedel.de/zh/post/2020/february/20200214-imagemagick-pdf-overview/</link>
      <pubDate>Fri, 14 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/zh/post/2020/february/20200214-imagemagick-pdf-overview/</guid>
      <description>如果你想从一个PDF文件中创建一个页面概述图像，那么你就来对地方了    第1步：创建工作文件夹 使用该命令创建一个临时工作文件夹。 x  &amp;ndash;  +   Terminal   $ mkdir /tmp/bilder  
第2步：独立的页面 以下命令为每个PDF页面创建一个图像。 x  &amp;ndash;  +   Terminal   $ convert 716023b632a9cbe6cad3ab368c202288.pdf /tmp/bilder/page.png  
第3步：安装图像 现在只需要把拼贴画放在一起。 x  &amp;ndash;  +   Terminal   $ montage /tmp/bilder/* -shadow -geometry &amp;#39;400x400&amp;#43;2&amp;#43;2&amp;gt;&amp;#39; -background &amp;#39;#f1f1f1&amp;#39; uebersich.jpg</description>
    </item>
    
    <item>
      <title>小故事：用Elgato Stream Deck编写Bash脚本</title>
      <link>https://www.christian-knedel.de/zh/post/2020/february/20200221-elgato-stream-deck/</link>
      <pubDate>Fri, 07 Feb 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.christian-knedel.de/zh/post/2020/february/20200221-elgato-stream-deck/</guid>
      <description>如果你想在Elgato Stream Deck中包含一个bash脚本，你首先需要一个bash脚本。
第1步：创建Bash脚本。 我创建了一个名为 &amp;ldquo;say-hallo.sh &amp;ldquo;的文件，内容如下。
#!/bin/bash say &amp;quot;hallo&amp;quot; 第2步：设定权利 下面的命令使该文件可以执行。 x  &amp;ndash;  +   Terminal   $ chmod 755 say-hallo.sh  
第3步：将Bash脚本包含在甲板中 3.1) 现在可以打开Stream Deck应用程序。    3.2) 然后我把 &amp;ldquo;打开系统 &amp;ldquo;的动作拖到一个按钮上。    3.3) 现在我可以选择我的bash脚本。    第四步：完成! 新的按钮现在可以使用了。</description>
    </item>
    
  </channel>
</rss>
