<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1180798125026232193</id><updated>2024-09-19T00:22:22.046+02:00</updated><title type='text'>top-scripts</title><subtitle type='html'>The best possible scripts from all around ...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-3171437665867064575</id><published>2023-07-01T15:01:00.006+02:00</published><updated>2023-07-01T15:33:53.283+02:00</updated><title type='text'></title><content type='html'>&lt;H1&gt;Linux commands for WinOS&lt;/H1&gt;

&lt;p&gt;In a package below you will find a lot of linux commands compioled as exe files. You can put them anywhere on the system you want, and run from batch window&lt;/p&gt;
&lt;p&gt;Download below:&lt;/p&gt;
&lt;a href=&quot;https://drive.google.com/file/d/12ZIfdqABoywzaWcFArNPGQnvYnIleqix/view?usp=sharing&quot;&gt;LINUX-UNIX.zip&lt;/a&gt;

</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/3171437665867064575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2023/07/linux-commands-for-winos-in-package.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/3171437665867064575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/3171437665867064575'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2023/07/linux-commands-for-winos-in-package.html' title=''/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-1835037024848356291</id><published>2011-01-05T14:37:00.001+01:00</published><updated>2023-07-01T14:53:35.102+02:00</updated><title type='text'>BASH TETRIS</title><content type='html'>This one is a pure bash tetris game.&lt;br /&gt;
Surprisingly working beyond all expectations.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center; &quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyQ_3YB-3mU_D0D7k5J41qSIctp1jJBn14HI0CWW_w2F30V-oIbnfDB3Pxl-uB3RrN4_lY2AfjbGbNZ31YZ1_Anq83LrTX2M3C3uRzFhiu5DR709Z1uDOwjOffOxd1n83BE6j7bI3wZN7S/s1600/bashtetris.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;191&quot; n4=&quot;true&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyQ_3YB-3mU_D0D7k5J41qSIctp1jJBn14HI0CWW_w2F30V-oIbnfDB3Pxl-uB3RrN4_lY2AfjbGbNZ31YZ1_Anq83LrTX2M3C3uRzFhiu5DR709Z1uDOwjOffOxd1n83BE6j7bI3wZN7S/s320/bashtetris.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;pre&gt;#!/bin/bash
# Tetris Game 
# 10.21.2003 xhchen 
# http://read.pudn.com/downloads99/sourcecode/game/404711/tetris.sh__.htm
# Copyright (C) xhchen&lt;xhchen winbond.com.tw=&quot;&quot;&gt;
#color definition 
cRed=1 
cGreen=2 
cYellow=3 
cBlue=4 
cFuchsia=5 
cCyan=6 
cWhite=7 
colorTable=($cRed $cGreen $cYellow $cBlue $cFuchsia $cCyan $cWhite) 
#size &amp;amp; position 
iLeft=3 
iTop=2 
((iTrayLeft = iLeft + 2)) 
((iTrayTop = iTop + 1)) 
((iTrayWidth = 10)) 
((iTrayHeight = 15)) 
#style definition 
cBorder=$cGreen 
cScore=$cFuchsia 
cScoreValue=$cCyan 
#control signal 
sigRotate=25 
sigLeft=26 
sigRight=27 
sigDown=28 
sigAllDown=29 
sigExit=30 
#boxes
box0=(0 0 0 1 1 0 1 1) 
box1=(0 2 1 2 2 2 3 2 1 0 1 1 1 2 1 3) 
box2=(0 0 0 1 1 1 1 2 0 1 1 0 1 1 2 0) 
box3=(0 1 0 2 1 0 1 1 0 0 1 0 1 1 2 1) 
box4=(0 1 0 2 1 1 2 1 1 0 1 1 1 2 2 2 0 1 1 1 2 0 2 1 0 0 1 0 1 1 1 2) 
box5=(0 1 1 1 2 1 2 2 1 0 1 1 1 2 2 0 0 0 0 1 1 1 2 1 0 2 1 0 1 1 1 2) 
box6=(0 1 1 1 1 2 2 1 1 0 1 1 1 2 2 1 0 1 1 0 1 1 2 1 0 1 1 0 1 1 1 2) 
box=(${box0[@]} ${box1[@]} ${box2[@]} ${box3[@]} ${box4[@]} ${box5[@]} ${box6[@]}) 
countBox=(1 2 2 2 4 4 4 ) 
offsetBox=(0 1 3 5 7 11 15) 
#score
iScoreEachLevel=50   #be greater than 7 
#Runtime data 
sig=0 
iScore=0 
iLevel=0 
boxNew=()         #new box 
cBoxNew=0         #new box color 
iBoxNewType=0     #new box type 
iBoxNewRotate=0   #new box rotate degree 
boxCur=()         #current box 
cBoxCur=0         #current box color 
iBoxCurType=0     #current box type 
iBoxCurRotate=0   #current box rotate degree 
boxCurX=-1        #current X position 
boxCurY=-1        #current Y position 
iMap=() 
for ((i = 0; i &amp;lt; iTrayHeight * iTrayWidth; i++)); do iMap[$i]=-1; done 
RunAsKeyReceiver() { 
   local pidDisplayer key aKey sig cESC sTTY 
   pidDisplayer=$1 
   aKey=(0 0 0) 
   cESC=`echo -ne &quot;\033&quot;` 
   cSpace=`echo -ne &quot;\040&quot;` 
   sTTY=`stty -g` 
    
   trap &quot;MyExit;&quot; INT TERM 
   trap &quot;MyExitNoSub;&quot; $sigExit 
    
   echo -ne &quot;\033[?25l&quot; 
   while : 
   do 
      read -s -n 1 key 
      aKey[0]=${aKey[1]} 
      aKey[1]=${aKey[2]} 
      aKey[2]=$key 
      sig=0 
      if [[ $key == $cESC &amp;amp;&amp;amp; ${aKey[1]} == $cESC ]] 
      then 
         MyExit 
      elif [[ ${aKey[0]} == $cESC &amp;amp;&amp;amp; ${aKey[1]} == &quot;[&quot; ]] 
      then 
         if [[ $key == &quot;A&quot; ]]; then sig=$sigRotate 
         elif [[ $key == &quot;B&quot; ]]; then sig=$sigDown 
         elif [[ $key == &quot;D&quot; ]]; then sig=$sigLeft 
         elif [[ $key == &quot;C&quot; ]]; then sig=$sigRight 
         fi 
      elif [[ $key == &quot;W&quot; || $key == &quot;w&quot; ]]; then sig=$sigRotate 
      elif [[ $key == &quot;S&quot; || $key == &quot;s&quot; ]]; then sig=$sigDown 
      elif [[ $key == &quot;A&quot; || $key == &quot;a&quot; ]]; then sig=$sigLeft 
      elif [[ $key == &quot;D&quot; || $key == &quot;d&quot; ]]; then sig=$sigRight 
      elif [[ &quot;[$key]&quot; == &quot;[]&quot; ]]; then sig=$sigAllDown 
      elif [[ $key == &quot;Q&quot; || $key == &quot;q&quot; ]] 
      then 
         MyExit 
      fi 
      if [[ $sig != 0 ]] 
      then 
         kill -$sig $pidDisplayer 
      fi 
   done 
} 
MyExitNoSub(){ 
   local y 
   stty $sTTY 
   ((y = iTop + iTrayHeight + 4)) 
   echo -e &quot;\033[?25h\033[${y};0H&quot; 
   exit 
} 
MyExit(){ 
   kill -$sigExit $pidDisplayer 
   MyExitNoSub 
} 
RunAsDisplayer(){ 
   local sigThis 
   InitDraw 
   trap &quot;sig=$sigRotate;&quot; $sigRotate 
   trap &quot;sig=$sigLeft;&quot; $sigLeft 
   trap &quot;sig=$sigRight;&quot; $sigRight 
   trap &quot;sig=$sigDown;&quot; $sigDown 
   trap &quot;sig=$sigAllDown;&quot; $sigAllDown 
   trap &quot;ShowExit;&quot; $sigExit 
   while :
   do 
      for ((i = 0; i &amp;lt; 21 - iLevel; i++)) 
      do 
         usleep 20000 
         sigThis=$sig 
         sig=0 
         if ((sigThis == sigRotate)); then BoxRotate; 
         elif ((sigThis == sigLeft)); then BoxLeft; 
         elif ((sigThis == sigRight)); then BoxRight; 
         elif ((sigThis == sigDown)); then BoxDown; 
         elif ((sigThis == sigAllDown)); then BoxAllDown; 
         fi 
      done 
      #kill -$sigDown $$ 
      BoxDown 
   done 
} 
BoxMove(){
   local j i x y xTest yTest 
   yTest=$1 
   xTest=$2 
   for ((j = 0; j &amp;lt; 8; j += 2)) 
   do 
      ((i = j + 1)) 
      ((y = ${boxCur[$j]} + yTest)) 
      ((x = ${boxCur[$i]} + xTest)) 
      if (( y &amp;lt; 0 || y &amp;gt;= iTrayHeight || x &amp;lt; 0 || x &amp;gt;= iTrayWidth)) 
      then 
         return 1 
      fi 
      if ((${iMap[y * iTrayWidth + x]} != -1 )) 
      then 
         return 1 
      fi 
   done 
   return 0; 
} 
Box2Map(){ 
   local j i x y xp yp line 
   for ((j = 0; j &amp;lt; 8; j += 2)) 
   do 
      ((i = j + 1)) 
      ((y = ${boxCur[$j]} + boxCurY)) 
      ((x = ${boxCur[$i]} + boxCurX)) 
      ((i = y * iTrayWidth + x)) 
      iMap[$i]=$cBoxCur 
   done 
   line=0 
   for ((j = 0; j &amp;lt; iTrayWidth * iTrayHeight; j += iTrayWidth)) 
   do 
      for ((i = j + iTrayWidth - 1; i &amp;gt;= j; i--)) 
      do 
         if ((${iMap[$i]} == -1)); then break; fi 
      done 
      if ((i &amp;gt;= j)); then continue; fi 
    
      ((line++))    
      for ((i = j - 1; i &amp;gt;= 0; i--)) 
      do 
         ((x = i + iTrayWidth)) 
         iMap[$x]=${iMap[$i]} 
      done 
      for ((i = 0; i &amp;lt; iTrayWidth; i++)) 
      do 
         iMap[$i]=-1 
      done 
   done 
   if ((line == 0)); then return; fi 
   ((x = iLeft + iTrayWidth * 2 + 7)) 
   ((y = iTop + 11)) 
   ((iScore += line * 2 - 1)) 
   echo -ne &quot;\033[1m\033[3${cScoreValue}m\033[${y};${x}H${iScore}         &quot; 
   if ((iScore % iScoreEachLevel &amp;lt; line * 2 - 1)) 
   then 
      if ((iLevel &amp;lt; 20)) 
      then 
         ((iLevel++)) 
         ((y = iTop + 14)) 
         echo -ne &quot;\033[3${cScoreValue}m\033[${y};${x}H${iLevel}        &quot; 
      fi 
   fi 
   echo -ne &quot;\033[0m&quot; 
   for ((y = 0; y &amp;lt; iTrayHeight; y++)) 
   do 
      ((yp = y + iTrayTop + 1)) 
      ((xp = iTrayLeft + 1)) 
      ((i = y * iTrayWidth)) 
      echo -ne &quot;\033[${yp};${xp}H&quot; 
      for ((x = 0; x &amp;lt; iTrayWidth; x++)) 
      do 
         ((j = i + x)) 
         if ((${iMap[$j]} == -1)) 
         then 
            echo -ne &quot;  &quot; 
         else 
            echo -ne &quot;\033[1m\033[7m\033[3${iMap[$j]}m\033[4${iMap[$j]}m\040\040\033[0m&quot; 
         fi 
      done 
   done 
} 
BoxDown(){ 
   local y s 
   ((y = boxCurY + 1)) 
   if BoxMove $y $boxCurX 
   then 
      s=&quot;`DrawCurBox 0`&quot; 
      ((boxCurY = y)) 
      s=&quot;$s`DrawCurBox 1`&quot; 
      echo -ne $s 
   else 
      Box2Map 
      RandomBox 
   fi 
} 
BoxLeft(){ 
   local x s 
   ((x = boxCurX - 1)) 
   if BoxMove $boxCurY $x 
   then 
      s=`DrawCurBox 0` 
      ((boxCurX = x)) 
      s=$s`DrawCurBox 1` 
      echo -ne $s 
   fi 
} 
BoxRight(){ 
   local x s 
   ((x = boxCurX + 1)) 
   if BoxMove $boxCurY $x 
   then 
      s=`DrawCurBox 0` 
      ((boxCurX = x)) 
      s=$s`DrawCurBox 1` 
      echo -ne $s 
   fi 
} 
BoxAllDown(){ 
   local k j i x y iDown s 
   iDown=$iTrayHeight 
   for ((j = 0; j &amp;lt; 8; j += 2)) 
   do 
      ((i = j + 1)) 
      ((y = ${boxCur[$j]} + boxCurY)) 
      ((x = ${boxCur[$i]} + boxCurX)) 
      for ((k = y + 1; k &amp;lt; iTrayHeight; k++)) 
      do 
         ((i = k * iTrayWidth + x)) 
         if (( ${iMap[$i]} != -1)); then break; fi 
      done 
      ((k -= y + 1)) 
      if (( $iDown &amp;gt; $k )); then iDown=$k; fi 
   done 
   s=`DrawCurBox 0` 
   ((boxCurY += iDown)) 
   s=$s`DrawCurBox 1` 
   echo -ne $s 
   Box2Map 
   RandomBox 
} 
BoxRotate(){ 
   local iCount iTestRotate boxTest j i s 
   iCount=${countBox[$iBoxCurType]} 
   ((iTestRotate = iBoxCurRotate + 1)) 
   if ((iTestRotate &amp;gt;= iCount)) 
   then 
      ((iTestRotate = 0)) 
   fi 
   for ((j = 0, i = (${offsetBox[$iBoxCurType]} + $iTestRotate) * 8; j &amp;lt; 8; j++, i++)) 
   do 
      boxTest[$j]=${boxCur[$j]} 
      boxCur[$j]=${box[$i]} 
   done 
   if BoxMove $boxCurY $boxCurX 
   then 
      for ((j = 0; j &amp;lt; 8; j++)) 
      do 
         boxCur[$j]=${boxTest[$j]} 
      done 
      s=`DrawCurBox 0` 
      for ((j = 0, i = (${offsetBox[$iBoxCurType]} + $iTestRotate) * 8; j &amp;lt; 8; j++, i++)) 
      do 
         boxCur[$j]=${box[$i]} 
      done 
      s=$s`DrawCurBox 1` 
      echo -ne $s 
      iBoxCurRotate=$iTestRotate 
   else 
      for ((j = 0; j &amp;lt; 8; j++)) 
      do 
         boxCur[$j]=${boxTest[$j]} 
      done 
   fi 
} 
DrawCurBox(){ 
   local i j t bDraw sBox s 
   bDraw=$1 
   s=&quot;&quot; 
   if (( bDraw == 0 )) 
   then 
      sBox=&quot;\040\040&quot; 
   else 
      sBox=&quot;\040\040&quot; 
      s=$s&quot;\033[1m\033[7m\033[3${cBoxCur}m\033[4${cBoxCur}m&quot;       
   fi 
   for ((j = 0; j &amp;lt; 8; j += 2)) 
   do 
      ((i = iTrayTop + 1 + ${boxCur[$j]} + boxCurY)) 
      ((t = iTrayLeft + 1 + 2 * (boxCurX + ${boxCur[$j + 1]}))) 
      s=$s&quot;\033[${i};${t}H${sBox}&quot; 
   done 
   s=$s&quot;\033[0m&quot; 
   echo -n $s 
} 
RandomBox(){ 
   local i j t 
   #change current box 
   iBoxCurType=${iBoxNewType} 
   iBoxCurRotate=${iBoxNewRotate} 
   cBoxCur=${cBoxNew} 
   for ((j = 0; j &amp;lt; ${#boxNew[@]}; j++)) 
   do 
      boxCur[$j]=${boxNew[$j]} 
   done 
   if (( ${#boxCur[@]} == 8 )) 
   then 
      #calculate current box&#39;s starting position 
      for ((j = 0, t = 4; j &amp;lt; 8; j += 2)) 
      do 
         if ((${boxCur[$j]} &amp;lt; t)); then t=${boxCur[$j]}; fi 
      done 
      ((boxCurY = -t)) 
      for ((j = 1, i = -4, t = 20; j &amp;lt; 8; j += 2)) 
      do 
         if ((${boxCur[$j]} &amp;gt; i)); then i=${boxCur[$j]}; fi 
         if ((${boxCur[$j]} &amp;lt; t)); then t=${boxCur[$j]}; fi 
      done 
      ((boxCurX = (iTrayWidth - 1 - i - t) / 2)) 
      echo -ne `DrawCurBox 1` 
      if ! BoxMove $boxCurY $boxCurX 
      then 
         kill -$sigExit ${PPID} 
         ShowExit 
      fi 
   fi 
   #clear old box 
   for ((j = 0; j &amp;lt; 4; j++)) 
   do 
      ((i = iTop + 1 + j)) 
      ((t = iLeft + 2 * iTrayWidth + 7)) 
      echo -ne &quot;\033[${i};${t}H        &quot; 
   done 
   #get a random new box 
   ((iBoxNewType = RANDOM % ${#offsetBox[@]})) 
   ((iBoxNewRotate = RANDOM % ${countBox[$iBoxNewType]})) 
   for ((j = 0, i = (${offsetBox[$iBoxNewType]} + $iBoxNewRotate) * 8; j &amp;lt; 8; j++, i++)) 
   do 
      boxNew[$j]=${box[$i]}; 
   done 
   ((cBoxNew = ${colorTable[RANDOM % ${#colorTable[@]}]})) 
   #display new box 
   echo -ne &quot;\033[1m\033[7m\033[3${cBoxNew}m\033[4${cBoxNew}m&quot; 
   for ((j = 0; j &amp;lt; 8; j += 2)) 
   do 
      ((i = iTop + 1 + ${boxNew[$j]})) 
      ((t = iLeft + 2 * iTrayWidth + 7 + 2 * ${boxNew[$j + 1]})) 
      echo -ne &quot;\033[${i};${t}H\040\040&quot; 
   done 
   echo -ne &quot;\033[0m&quot; 
} 
InitDraw(){ 
   clear 
   RandomBox 
   RandomBox 
   local i t1 t2 t3 
   #draw border 
   echo -ne &quot;\033[1m&quot; 
   echo -ne &quot;\033[3${cBorder}m\033[4${cBorder}m&quot; 
   ((t2 = iLeft + 1)) 
   ((t3 = iLeft + iTrayWidth * 2 + 3)) 
   for ((i = 0; i &amp;lt; iTrayHeight; i++)) 
   do 
      ((t1 = i + iTop + 2)) 
      echo -ne &quot;\033[${t1};${t2}H\040\040&quot; 
      echo -ne &quot;\033[${t1};${t3}H\040\040&quot; 
   done 
   ((t2 = iTop + iTrayHeight + 2)) 
   for ((i = 0; i &amp;lt; iTrayWidth + 2; i++)) 
   do 
      ((t1 = i * 2 + iLeft + 1)) 
      echo -ne &quot;\033[${iTrayTop};${t1}H\040\040&quot; 
      echo -ne &quot;\033[${t2};${t1}H\040\040&quot; 
   done 
   echo -ne &quot;\033[0m&quot; 
   #draw score &amp;amp; level prompt 
   echo -ne &quot;\033[1m&quot; 
   ((t1 = iLeft + iTrayWidth * 2 + 7)) 
   ((t2 = iTop + 10)) 
   echo -ne &quot;\033[3${cScore}m\033[${t2};${t1}HScore&quot; 
   ((t2 = iTop + 11)) 
   echo -ne &quot;\033[3${cScoreValue}m\033[${t2};${t1}H${iScore}&quot; 
   ((t2 = iTop + 13)) 
   echo -ne &quot;\033[3${cScore}m\033[${t2};${t1}HLevel&quot; 
   ((t2 = iTop + 14)) 
   echo -ne &quot;\033[3${cScoreValue}m\033[${t2};${t1}H${iLevel}&quot; 
   echo -ne &quot;\033[0m&quot; 
} 
ShowExit(){ 
   local y 
   ((y = iTrayHeight + iTrayTop + 3)) 
   echo -e &quot;\033[${y};0HGameOver!\033[0m&quot; 
   exit 
} 
#Start from here. 
if [[ $1 != &quot;--go&quot; ]] 
then 
  $0 --go&amp;amp; 
  RunAsKeyReceiver $! 
  exit 
else 
   RunAsDisplayer 
   exit 
fi 


&lt;/xhchen&gt;&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/1835037024848356291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2011/01/bash-tetris.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/1835037024848356291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/1835037024848356291'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2011/01/bash-tetris.html' title='BASH TETRIS'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyQ_3YB-3mU_D0D7k5J41qSIctp1jJBn14HI0CWW_w2F30V-oIbnfDB3Pxl-uB3RrN4_lY2AfjbGbNZ31YZ1_Anq83LrTX2M3C3uRzFhiu5DR709Z1uDOwjOffOxd1n83BE6j7bI3wZN7S/s72-c/bashtetris.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-6969798706544190745</id><published>2011-01-05T14:23:00.009+01:00</published><updated>2023-07-01T14:53:53.007+02:00</updated><title type='text'>BASH GAMES: Bash Invaders</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is the script I have found when trying to manage asynchronous call under bash.&lt;br /&gt;
Use J K L keys to navigate and shoot. &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlug64iEG0YjWCy4M2BQtFbJeXbFWbDyNqcNt7tCa6nD_NVgbeHJxN0bwUa-lXhkF3WiNBSp9FetRcLoppb6YFBhsWj3Yot54TTDw40uusDg-MJXuDuNvc89netkpGV1-8XhtWX7unDlF/s1600/bashinvaders.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlug64iEG0YjWCy4M2BQtFbJeXbFWbDyNqcNt7tCa6nD_NVgbeHJxN0bwUa-lXhkF3WiNBSp9FetRcLoppb6YFBhsWj3Yot54TTDw40uusDg-MJXuDuNvc89netkpGV1-8XhtWX7unDlF/s320/bashinvaders.png&quot; height=&quot;191&quot; n4=&quot;true&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;
#!/bin/bash
if [[ $1 != &quot;&quot; ]]
then
cat &amp;lt;&amp;lt; END
BashInvaders!
by Vidar &#39;koala_man&#39; Holen
www.vidarholen.net

Originally an entry in the #linux.no 1KiB compo (thus the ugly source)
This is a pre-trim version with colors and proper tmp files. All bash. 
Released under the GNU General Public License.

Control your ship with J and L, shoot with K. 
Quit with Q or sigint.

Requires mktemp and sleep with fractions. 

END
exit 0
fi

tput civis

cd /tmp
e=echo
c=clear
r=return
E=&quot;$e -ne &quot;
A=$E\\033[
m() { $A$2\;$1\H
}
f() { $A\1\;3$2\m
}

trap z=SigInt SIGINT
 g() {
 $e ${K[$(($2*8+$1))]}
}
 s() {
 K[$(($2*8+$1))]=$3
}
 u() {
 [ $T = 0 ] &amp;amp;&amp;amp; $r 0
 m $S $((--T))
 $E `f 3`&quot;.&quot;
 x=$((S-Y))
 y=$((T-Z))
 [ $((y%3)) = 0 -a $((x%6)) -lt 4 ] || $r 0
 : $((y/=3)) $((x/=6))
 [ &quot;`g $x $y`&quot; = 1 -a $x -le $o -a $x -ge $n -a $y -le $q -a $y -ge 0 ] || $r 0
 [ $Q = 1 ] &amp;amp;&amp;amp; z=&quot;You win!&quot;
 s $x $y 0 
 : $((Q--))
 T=0
 $r 1
}
 a() {
 w n +
 w o - 
 h 
}
 w() {
 d=0
 for (( I=0; I&amp;lt;=q; I++ )) {
  [ `g $(($1)) $I` = 1 ] &amp;amp;&amp;amp; D=1
 }
 [ $D = 0 ] &amp;amp;&amp;amp; : $(($1$2=1)) 
}
 h() {
for (( I=q; I&amp;gt;=0; I--)) {
for (( J=n; J&amp;lt;=o; J++)) {
   [ `g $J $I` = 1 ] &amp;amp;&amp;amp; q=$I &amp;amp;&amp;amp;  $r
  }
 }
 }
 
 j() { 
 while read -n 1 S &amp;gt;/dev/null 2&amp;gt;&amp;amp;1
do
$e $S &amp;gt; $M
done
}

G=`mktemp`
L=`mktemp`
M=`mktemp`
N=`mktemp`
X=40
n=0
o=7
q=2
T=0
Y=2
Z=2
U=2
W=0
for (( Q=0; Q&amp;lt;24; Q++)) { 
 K[$Q]=1
}

j 0&amp;lt;&amp;amp;0 &amp;amp;
B=$!

until [ &quot;$z&quot; ]
do
 : $((W++)) 
 if [ -f $M ] 
 then
  i=$(&amp;lt;$M)
  rm $M
  case &quot;$i&quot; in
   q) z=&quot;Quit&quot; ;;
   j) X=$(($X-3)) ;;
   l) X=$(($X+3)) ;;
   k) [ $T = 0 ] &amp;amp;&amp;amp; S=$((X+1)) &amp;amp;&amp;amp; T=22 
   ;;
  esac
 fi
 rm $N  
 exec &amp;gt; $N
for (( J=0; J&amp;lt;=q; J++)) { 
  for (( I=n; I&amp;lt;=o; I++)) { 
   [ `g $I $J` = 1 ] &amp;amp;&amp;amp; m $((I*6+Y)) $((J*3+Z)) &amp;amp;&amp;amp; $e `f 4`/00\\
  }
 }
 m $X 23
 $e `f 2`&quot;/|\\&quot;
 [ $T != 0 ] &amp;amp;&amp;amp; u  
 a
 m 0 0
 exec &amp;gt; `tty`
$c
cat $N
sleep .1
[ $((W%2)) = 0 ] &amp;amp;&amp;amp; : $((Y+=U)) &amp;amp;&amp;amp; if [ $((Y+n*6)) -lt 2 -o $((Y+o*6)) -gt 75 ] 
then 
: $((U=-U))  $((Z+=2))
[ $((Z+q*3)) -le 20 ] || z=&quot;You lose!&quot;
fi
done

$c
$e $z
rm $G $L $M $N $F &amp;amp;&amp;gt; /dev/null
kill $B

&lt;/code&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/6969798706544190745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2011/01/bash-games-bash-invaders.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/6969798706544190745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/6969798706544190745'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2011/01/bash-games-bash-invaders.html' title='BASH GAMES: Bash Invaders'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGlug64iEG0YjWCy4M2BQtFbJeXbFWbDyNqcNt7tCa6nD_NVgbeHJxN0bwUa-lXhkF3WiNBSp9FetRcLoppb6YFBhsWj3Yot54TTDw40uusDg-MJXuDuNvc89netkpGV1-8XhtWX7unDlF/s72-c/bashinvaders.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-2157477075796871107</id><published>2011-01-04T10:38:00.004+01:00</published><updated>2023-07-01T14:54:07.037+02:00</updated><title type='text'>SHELL COMMANDS</title><content type='html'>&lt;style&gt;
table.stats 
 {text-align: center;
 font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
 font-weight: normal;
 font-size: 10px;
 color: #fff;
 width: 700px;
 background-color: #000;
 border: 0px;
 border-collapse: collapse;
 border-spacing: 0px;}
table.stats td 
 {background-color: #ddd;
 color: #000;
 padding: 2px;
 text-align: left;
 border: 1px #fff solid;}
table.stats td.hed
 {background-color: #333;
 color: #fff;
 padding: 2px;
 text-align: left;
 border-bottom: 1px #fff solid;
 font-size: 12px;
 font-weight: bold;}
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&amp;nbsp;&lt;/center&gt;
&lt;center&gt;

&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&amp;nbsp;&lt;/center&gt;
&lt;center&gt;
&amp;nbsp;&lt;/center&gt;
&lt;center&gt;
&lt;pre&gt;|
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ


The most common UNIX / Linux commands
with examples (by om8000@gmail.com):


                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ

                |
                ˇ






&lt;/pre&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;cal _ _ _ _ _ _ _ _ _ _ _ _ _ _ display a calendar&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Dispaly calender for a current month&lt;/td&gt;&lt;td&gt;cal&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Dispaly calender for a current year&lt;/td&gt;&lt;td&gt;cal 2008&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display calendar dates for the whole years&lt;/td&gt;&lt;td&gt;cal -y&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display julian dates (number of days from 1 to 365)&lt;/td&gt;&lt;td&gt;cal -j&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display a calendar&lt;/td&gt;&lt;td&gt;cal -1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display a calendar with one month before and one in the future&lt;/td&gt;&lt;td&gt;cal -3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display a calendar for a particular month year&lt;/td&gt;&lt;td&gt;cal 9 2008&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see:&lt;/td&gt;&lt;td&gt;man cal&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;finger _ _ _ _ _ _ _ _ _ _ _ _ _ _ user info lookup program &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man finger&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;If you have Lnternet access, get latest kernel info: &lt;/td&gt;&lt;td&gt;finger @finger.kernel.org&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;clear _ _ _ _ _ _ _ _ _ _ _ _ _ _ clear the terminal screen &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;clear screen if possible &lt;/td&gt;&lt;td&gt;clear -or- ctrl+r &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;write _ _ _ _ _ _ _ _ _ _ _ _ _ _ send a message to another user&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write message to user1 &lt;/td&gt;&lt;td&gt;write user2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write message back to user root &lt;/td&gt;&lt;td&gt;write root #(This way two way communication is established (simple chat).) &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;wall _ _ _ _ _ _ _ _ _ _ _ _ _ _ send a message to all connected users&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Send a administrative message to all users: &lt;/td&gt;&lt;td&gt;wall &quot;Server will bew rebooted in 5 minutes&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Someone can also redirect message from a file &lt;/td&gt;&lt;td&gt;wall &amp;lt; admin.msg &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;talk _ _ _ _ _ _ _ _ _ _ _ _ _ _ Talk client for one-on-one Internet chatting&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man talk &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Potentially dangerous! Requires talk server to be running!&lt;br /&gt;
To talk to another user, just try: &lt;/td&gt;&lt;td&gt;talk user2 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;mesg _ _ _ _ _ _ _ _ _ _ _ _ _ _ control write access to your terminal&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man mesg &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Allow other people to send you messages to the console &lt;/td&gt;&lt;td&gt;mesg y &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Do not allow other users to send you messages using write or wall &lt;/td&gt;&lt;td&gt;mesg n &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;mkdir _ _ _ _ _ _ _ _ _ _ _ _ _ _ create a directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man mkdir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create two directories simultaneously &lt;/td&gt;&lt;td&gt;mkdir dir1 dir2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create directory g1 inside existing directory r1 in the current directory: &lt;/td&gt;&lt;td&gt;mkdir r1/d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create complete subdirectory structure at once &lt;/td&gt;&lt;td&gt;mkdir -p /tmp/d1/d2/d3 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create directory path d1/d2/d3 underneath the current directory and &lt;br /&gt;
set permissions on directory diamond to read-only for all users (a=r):&lt;/td&gt;&lt;td&gt;mkdir -p -m &quot;a=r&quot; d1/d2/d3 &lt;br /&gt;
mkdir -p -m 444 d1/d1/d3 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Creating many directories using curly braces expansion &lt;/td&gt;&lt;td&gt;mkdir -p /work/junk/{one,two,three,four} &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;cd _ _ _ _ _ _ _ _ _ _ _ _ _ _ change the working directory&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Go to home directory &lt;/td&gt;&lt;td&gt;cd &lt;br /&gt;
cd ~ &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Go to previous directory &lt;/td&gt;&lt;td&gt;cd - &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Go to dir, execute command and return to current dir &lt;/td&gt;&lt;td&gt;(cd dir &amp;amp;&amp;amp; command) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Change working directory and if successfull, execute listing &lt;/td&gt;&lt;td&gt;cd /tmp &amp;amp;&amp;amp; ls &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Enter to directory &#39;/ home&#39; &lt;/td&gt;&lt;td&gt;cd /home &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Go back one level &lt;/td&gt;&lt;td&gt;cd .. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Go back two levels &lt;/td&gt;&lt;td&gt;cd ../.. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man cd &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;exit _ _ _ _ _ _ _ _ _ _ _ _ _ _ cause normal process termination&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man exit &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Exit with a true value: &lt;/td&gt;&lt;td&gt;exit 0 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Exit with a false value: &lt;/td&gt;&lt;td&gt;exit 1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Some error codes: &lt;/td&gt;&lt;td&gt;A file to be executed was found, but it was not an executable utility: 126 &lt;br /&gt;
A utility to be executed was not found: 127 &lt;br /&gt;
A command was interrupted by a signal: 128 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;cp _ _ _ _ _ _ _ _ _ _ _ _ _ _ copy files and directories&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create fast backup of a file &lt;/td&gt;&lt;td&gt;cp /etc/fstab{,.bak} &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Copy a file to another location &lt;/td&gt;&lt;td&gt;cp /tmp/f1 /var/tmp/f2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make an archive copy of entire directory: &lt;/td&gt;&lt;td&gt;cp -a /opt /tmp &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To create a zero-length file, using cp: &lt;/td&gt;&lt;td&gt;cp /dev/null /tmp/file &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Copy a directory within the current work directory and preserve attributes &lt;/td&gt;&lt;td&gt;cp -a -p /tmp/dir1 . &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Backing up a directory preserving ownerships, permissions and &lt;br /&gt;
links, to another partition to hard disk, do: &lt;/td&gt;&lt;td&gt;cp -a /dir-to-backup -or- cp -dpR /dir-to-backup &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Copy all files of a directory within the current work directory &lt;/td&gt;&lt;td&gt;cp dir/* . &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man cp &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;ln _ _ _ _ _ _ _ _ _ _ _ _ _ _ make hard/soft links between files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man ln &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Creating soft links: &lt;/td&gt;&lt;td&gt;ln -s /etc /var/tmp/etc &lt;br /&gt;
&lt;br /&gt;
NOTE:&lt;br /&gt;
Soft links are usefull for linking among different partitions.&lt;br /&gt;
Hard links will only work on the same partition/filesystem.&lt;br /&gt;
Reason for that are inodes which have different i-numbers on&lt;br /&gt;
different filesystems, so filename can not point to them.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create a physical link to file &lt;/td&gt;&lt;td&gt;ln file1 lnk1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;The following command creates fl1 and fl2 in destination_dir,&lt;br /&gt;
which are linked back to the original files fl1 and fl2. If files on destination &lt;br /&gt;
already exist, they will be removed. &lt;/td&gt;&lt;td&gt;ln -f fl1 fl2 destination_dir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;who _ _ _ _ _ _ _ _ _ _ _ _ _ _ show who is logged in&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man who &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get inf oabout logged in users &lt;/td&gt;&lt;td&gt;who &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show who is logged on, and print: time of last system boot, dead&lt;br /&gt;
processes, system login processes, active processes spawned by init,&lt;br /&gt;
current runlevel, last system clock change &lt;/td&gt;&lt;td&gt;who -a &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get detailed info with times and processes &lt;/td&gt;&lt;td&gt;who --all &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Give me info only about me &lt;/td&gt;&lt;td&gt;who am I -or- who am i -and also see whoami- &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get runlevel and date using who: &lt;/td&gt;&lt;td&gt;who -r &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;od _ _ _ _ _ _ _ _ _ _ _ _ _ _ dump files in octal and other formats&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man od &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Simple octal output &lt;/td&gt;&lt;td&gt;od /etc/passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write hexadecimal bytes and the corresponding octal values to the&lt;br /&gt;
standard output in blocks of 16 bytes in one line &lt;/td&gt;&lt;td&gt;od -tx1oC /etc/passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;The following commands write one line each of the types character,&lt;br /&gt;
signed decimal integer, and float, in the order given, transforming&lt;br /&gt;
100 bytes of data starting from fifteenth byte offset in the file file1: &lt;/td&gt;&lt;td&gt;od -j14 -N100 -tc -tdfF /etc/passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Write one line each of the types unsigned integer, named character, and&lt;br /&gt;
long double, with the offsets written in hexadecimal and forcing a write &lt;/td&gt;&lt;td&gt;od -v -Ax -tuafL /etc/passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Creating random nubers from urandom device &lt;/td&gt;&lt;td&gt;od -An -N2 -tu &amp;lt; /dev/urandom &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;nautilus _ _ _ _ _ _ _ _ _ _ _ _ _ _ Nautilus is a file manager for GNOME.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;start file explorer style &lt;/td&gt;&lt;td&gt;nautilus --browser &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Samba browser -- basically &quot;Network Neighborhood&quot; &lt;/td&gt;&lt;td&gt;nautilus smb:/// &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Font browser. Click on font to see stuff. &lt;/td&gt;&lt;td&gt;nautilus fonts:/// &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Access the top of My Computer &lt;/td&gt;&lt;td&gt;nautilus computer:/// &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Access network shares &lt;/td&gt;&lt;td&gt;nautilus network:/// &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;preparation for burning to CD &lt;/td&gt;&lt;td&gt;nautilus burn:/// &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Displays a whole bunch of themes. You can change your &lt;/td&gt;&lt;td&gt;theme from here &lt;br /&gt;
nautilus themes:///&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;browse certain directory &lt;/td&gt;&lt;td&gt;nautilus file:///etc/ &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;less _ _ _ _ _ _ _ _ _ _ _ _ _ _ A text file browser similar to more&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man less &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;See start of some file: &lt;/td&gt;&lt;td&gt;less /tmp/bigfile &lt;br /&gt;
pgUp/pgDn # browse more &lt;br /&gt;
q # exit less command&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Try less with line numbering &lt;/td&gt;&lt;td&gt;less -N /etc/passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Switch to vi edit mode using less &lt;/td&gt;&lt;td&gt;while scrolling file with less, just press: v &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;rmdir _ _ _ _ _ _ _ _ _ _ _ _ _ _ remove empty directories&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man rmdir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To remove empty directory with a prompt for verification: &lt;/td&gt;&lt;td&gt;rmdir -i directory &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To remove as much as possible of a path, of empty directories type: &lt;/td&gt;&lt;td&gt;rmdir -p component1/component2/dir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To remove directory including files: &lt;/td&gt;&lt;td&gt;rm -r /tmp/subdir1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;strings _ _ _ _ _ _ _ _ _ _ _ _ _ _ show printable characters in binary files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man strings &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove ^M andall other control chars within the file &lt;/td&gt;&lt;td&gt;strings filename.ext &amp;gt; newfile.ext &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;pwd _ _ _ _ _ _ _ _ _ _ _ _ _ _ return working directory name&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print cuurent working directory example &lt;/td&gt;&lt;td&gt;pwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print cuurent working directory disregarding symbolic link &lt;/td&gt;&lt;td&gt;pwd -P &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;whoami _ _ _ _ _ _ _ _ _ _ _ _ _ _ print effective userid&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man whoami &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Give me my username: &lt;/td&gt;&lt;td&gt;whoami &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;logout _ _ _ _ _ _ _ _ _ _ _ _ _ _ Logout of a login shell&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man logout &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Leaving session &lt;/td&gt;&lt;td&gt;logout &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;xlock _ _ _ _ _ _ _ _ _ _ _ _ _ _ Locks the local X display&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To lock X session &lt;/td&gt;&lt;td&gt;xlock &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lock the screen with a different screensaver &lt;/td&gt;&lt;td&gt;xlock -mode forest &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show all possible options on xlock &lt;/td&gt;&lt;td&gt;xlock --help &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;vlock _ _ _ _ _ _ _ _ _ _ _ _ _ _ Virtual Console lock program vlock&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To lock current console or terminal &lt;/td&gt;&lt;td&gt;vlock &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To lock all physical consoles &lt;/td&gt;&lt;td&gt;vlock -a &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;ls _ _ _ _ _ _ _ _ _ _ _ _ _ _ list directory contents&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Perform long listing and mark executable files with asterisk &lt;/td&gt;&lt;td&gt;ls -bCAFl &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;get ls to do thousands grouping appropriate to locale &lt;/td&gt;&lt;td&gt;BLOCK_SIZE=\&#39;1 ls -l &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print colored output &lt;/td&gt;&lt;td&gt;ls --color &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;List files with full detailed creation time &lt;/td&gt;&lt;td&gt;ls --full-time -t &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show files, last changed - last &lt;/td&gt;&lt;td&gt;ls -lahtr &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;List files by date. &lt;/td&gt;&lt;td&gt;ls -lrt &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show size of the files and directories ordered by size &lt;/td&gt;&lt;td&gt;ls -lSr |more &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;List files and directories and mark them like: add asterisk for executables &lt;br /&gt;
and slash for directories: &lt;/td&gt;&lt;td&gt;ls -F &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;List directories only at the current path: &lt;/td&gt;&lt;td&gt;ls -d */ &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Use -d switch to list all hidden files and directories at the current path: &lt;/td&gt;&lt;td&gt;ls -d .* &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show file attributes and ownership &lt;/td&gt;&lt;td&gt;ls -la /tmp/file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show files with hidden characters in names &lt;/td&gt;&lt;td&gt;ls -b /tmp/* &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show files info node numbes &lt;/td&gt;&lt;td&gt;ls -la -i /tmp &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show human readable file sizes &lt;/td&gt;&lt;td&gt;ls -lah /tmp &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Counting files and subdirs in directory &lt;/td&gt;&lt;td&gt;ls -l |wc -l &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To list files sorted by size: &lt;/td&gt;&lt;td&gt;ls -Sl &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Revers sort all files by size &lt;/td&gt;&lt;td&gt;ls -laSr &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Find all files containing ls in their names &lt;/td&gt;&lt;td&gt;ls -lR | grep ps &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;View files of directory &lt;/td&gt;&lt;td&gt;ls &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;View files of directory &lt;/td&gt;&lt;td&gt;ls -F &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show details of files and directory &lt;/td&gt;&lt;td&gt;ls -l &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show hidden files &lt;/td&gt;&lt;td&gt;ls -a &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Knowing inode number of files &lt;/td&gt;&lt;td&gt;ls -ail &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show files and directory containing numbers &lt;/td&gt;&lt;td&gt;ls *[0-9]* &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;List biggest files in the current directory last &lt;/td&gt;&lt;td&gt;ls -lShr &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;list without owners info &lt;/td&gt;&lt;td&gt;ls -lg * &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;multicolumn output into file &lt;/td&gt;&lt;td&gt;ls -C &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;give me sorted listing &lt;/td&gt;&lt;td&gt;ls -Slh / &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man ls &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;mv _ _ _ _ _ _ _ _ _ _ _ _ _ _ move (rename) files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man mv &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Rename a file in the current directory: &lt;/td&gt;&lt;td&gt;mv old-filename new-filename &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Rename a directory in the current directory: &lt;/td&gt;&lt;td&gt;mv old-dirname new-dirname &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Rename a file in the current directory whose name starts with a nonprinting&lt;br /&gt;
control character or a character that is special to the shell, such as - &lt;br /&gt;
and * (extra care may be required depending on the situation): &lt;/td&gt;&lt;td&gt;mv ./bad-filename new-filename&lt;br /&gt;
mv ./?bad-filename new-filename&lt;br /&gt;
mv ./*bad-filename new-filename &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Move directory sourcedir and its contents to a new location (targetdir) in&lt;br /&gt;
the file system (upon completion, a subdirectory named sourcedir resides&lt;br /&gt;
in directory targetdir): &lt;/td&gt;&lt;td&gt;mv sourcedir targetdir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Move all files and directories (including links) in the current&lt;br /&gt;
directory to a new location underneath targetdir: &lt;/td&gt;&lt;td&gt;mv * targetdir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Move all files and directories (including links) in sourcedir to a new&lt;br /&gt;
location underneath targetdir (sourcedir and targetdir are in separate&lt;br /&gt;
directory paths): &lt;/td&gt;&lt;td&gt;mv sourcedir/* targetdir &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;results with the original files a and b residing&lt;br /&gt;
in the directory d in the current directory. &lt;/td&gt;&lt;td&gt;mv a b c&lt;br /&gt;
mv c d &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;more _ _ _ _ _ _ _ _ _ _ _ _ _ _ file perusal filter for crt viewing&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man more &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display file contents page by page &lt;/td&gt;&lt;td&gt;more /tmp/bigfile &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display contents of all files in the current directory: &lt;/td&gt;&lt;td&gt;more * &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Switch to vi edit mode using more&lt;br /&gt;
while scrolling file contents using more, just press: &lt;/td&gt;&lt;td&gt;v &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To preview nroff output, use a command resembling: &lt;/td&gt;&lt;td&gt;nroff -mm +2 doc.n | more -s &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;If the file contains tables, use: &lt;/td&gt;&lt;td&gt;tbl file | nroff -mm | col | more -s &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To display file stuff in a fifteen line-window and convert multiple&lt;br /&gt;
adjacent blank lines into a single blank line: &lt;/td&gt;&lt;td&gt;more -s -n 15 stuff &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To examine each file with its last screenful: &lt;/td&gt;&lt;td&gt;more -p G file1 file2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To examine each file starting with line 100 in the current position &lt;br /&gt;
(third line, so line 98 is the first line written): &lt;/td&gt;&lt;td&gt;more -p 100g file1 file2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To examine the file that contains the tagstring tag with line 30 in the current position: &lt;/td&gt;&lt;td&gt;more -t tag -p 30g &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;The -p allows arbitrary commands to be executed at the start of each file. &lt;/td&gt;&lt;td&gt;more -p G file1 file2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Examine each file starting with its last screenful. &lt;/td&gt;&lt;td&gt;more -p 100 file1 file2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Examine each file starting with line 100 in the current position &lt;br /&gt;
(usually the third line, so line 98 would be the first line written). &lt;/td&gt;&lt;td&gt;more -p /100 file1 file2 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;

&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;
&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;
&amp;lt;&amp;gt;&amp;lt;&amp;gt;

&amp;lt;/&amp;gt;&amp;lt;/&amp;gt;&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;cat _ _ _ _ _ _ _ _ _ _ _ _ _ _ concatenate and print files&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;catenate is an obscure word meaning &quot;to connect in a series&quot; &lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Number row of a file &lt;/td&gt;&lt;td&gt;cat -n file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Join splitted files into one single binary or txt &lt;/td&gt;&lt;td&gt;cat xaa xab xac &amp;gt;prog.bin -or- cat x* &amp;gt;prog.bin &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To create a zero-length file, using cat: &lt;/td&gt;&lt;td&gt;cat /dev/null &amp;gt; file &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get all contetnts from a file &lt;/td&gt;&lt;td&gt;cat /tmp/file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display a file &lt;/td&gt;&lt;td&gt;at ch1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Combine files &lt;/td&gt;&lt;td&gt;cat ch1 ch2 ch3 &amp;gt; all &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Append to a file &lt;/td&gt;&lt;td&gt;cat note5 &amp;gt;&amp;gt; notes &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create file at terminal. To exit, enter EOF (Ctrl-D). &lt;/td&gt;&lt;td&gt;cat &amp;gt; temp1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create file at terminal. To exit, enter STOP. &lt;/td&gt;&lt;td&gt;cat &amp;gt; temp2 &amp;lt;&amp;lt; STOP &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;The following prints ^I for all the occurrences of tab character in file1 &lt;/td&gt;&lt;td&gt;cat -t file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To suppress error messages about files that do not exist, use: &lt;/td&gt;&lt;td&gt;cat -s file1 file2 file3 &amp;gt; file &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To view non-printable characters in file2, use: &lt;/td&gt;&lt;td&gt;cat -v file2 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;general syntax to manipulate a text of a file, and write result to a new file &lt;/td&gt;&lt;td&gt;cat file1 | command( sed, grep, awk, grep, etc...) &amp;gt; result.txt &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;see all characters in a file (also strange ones and from dos ...) &lt;/td&gt;&lt;td&gt;cat -vet textfile &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;join contetnt from files with command output&lt;br /&gt;
Command below will show contetnts of header_file first, then result of w&lt;br /&gt;
command and after that contetnts of footer_file &lt;/td&gt;&lt;td&gt;w|cat header_file - footer_file &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man cat &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;rm _ _ _ _ _ _ _ _ _ _ _ _ _ _ remove files or directories&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man rm &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create a safe remove command:&lt;br /&gt;
&lt;br /&gt;
On your system you should put this one into /etc/profile to make it&lt;br /&gt;
&lt;br /&gt;
available for all users. See also function command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Good think: Instead of removing files and dirs for real, you will save&lt;br /&gt;
&lt;br /&gt;
them into .Trash directory. This function should also prevent all&lt;br /&gt;
&lt;br /&gt;
features of rm -rf to stop a real damage. To rum a real rm command, you&lt;br /&gt;
&lt;br /&gt;
will need to use a full path otherwise you will never remove files for real.&lt;/td&gt;&lt;td&gt;function rm {&lt;br /&gt;
&lt;br /&gt;
mkdir ~/.Trash 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
mv $@ ~/.Trash 2&amp;gt;/dev/null&lt;br /&gt;
&lt;br /&gt;
}&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove files with a prompt for verification:&lt;/td&gt;&lt;td&gt;rm -i file1 file2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove all the files in a directory:&lt;/td&gt;&lt;td&gt;rm -i mydirectory/*&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove a file in the current directory whose name starts with - or * or&lt;br /&gt;
&lt;br /&gt;
some other character that is special to the shell:&lt;/td&gt;&lt;td&gt;rm ./-filename&lt;br /&gt;
&lt;br /&gt;
rm \*filename&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove a file in the current directory whose name starts with some&lt;br /&gt;
&lt;br /&gt;
strange (usually nonprinting, invisible) character:&lt;/td&gt;&lt;td&gt;rm -i *filename*&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;A powerful and dangerous command to remove a nonempty directory is:&lt;/td&gt;&lt;td&gt;rm -rf dir_name&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;WARNING, DANGEROUS - FOR TESTING PURPOSES ONLY!!!&lt;br /&gt;
&lt;br /&gt;
Remove a whole system while it is running!&lt;/td&gt;&lt;td&gt;# /bin/rm -rf /*&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Delete file called &#39;file1&#39;&lt;/td&gt;&lt;td&gt;rm -f file1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Delete directory called &#39;dir1&#39;&lt;/td&gt;&lt;td&gt;rmdir dir1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove a directory called &#39;dir1&#39; and contents recursively&lt;/td&gt;&lt;td&gt;rm -rf dir1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove two directories and their contents recursively&lt;/td&gt;&lt;td&gt;rm -rf dir1 dir2&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Destroy a whole linux server, all settings and programs (DANGEROUS):&lt;/td&gt;&lt;td&gt;#rm -rf /*&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;info _ _ _ _ _ _ _ _ _ _ _ _ _ _ A stand-alone TTY-based reader for GNU texinfo&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man info &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man pinfo &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show top-level dir menu&lt;/td&gt;&lt;td&gt;info&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man info &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;info emacs&lt;/td&gt;&lt;td&gt;start at emacs node from top-level dir&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;info emacs buffers&lt;/td&gt;&lt;td&gt;start at buffers node within emacs manual&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;start at node with emacs&#39; command line options&lt;/td&gt;&lt;td&gt;info --show-options emacs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show file ./foo.info, not searching dir&lt;/td&gt;&lt;td&gt;info -f ./foo.info&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;top _ _ _ _ _ _ _ _ _ _ _ _ _ _ display top CPU processes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man top &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For better tool also try:&lt;/td&gt;&lt;td&gt;htop&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;top is text mode process table explorer&lt;/td&gt;&lt;td&gt;will show: cpu, memory, swap utilization, load avg and uptime&lt;br /&gt;
&lt;br /&gt;
will not show: cpu info, system info, platform type ...&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show processes status every second and operate top interactivelly&lt;/td&gt;&lt;td&gt;top&lt;br /&gt;
&lt;br /&gt;
sort processes by memory&lt;br /&gt;
&lt;br /&gt;
M&lt;br /&gt;
&lt;br /&gt;
sort processes by CPU&lt;br /&gt;
&lt;br /&gt;
P&lt;br /&gt;
&lt;br /&gt;
show all CPUs&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
&lt;br /&gt;
exit top&lt;br /&gt;
&lt;br /&gt;
q &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show processess status every two seconds and run only three times&lt;/td&gt;&lt;td&gt;top -d2 -n3&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;create output that is suitable for saving into a file&lt;/td&gt;&lt;td&gt;top -d10 -n100 &amp;gt;/tmp/top.txt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Monitor process identifier (PID) 2233 and 4455, you type:&lt;/td&gt;&lt;td&gt;top -p 2233,4455&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Monitor processes by root user only&lt;/td&gt;&lt;td&gt;top -u root&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Monitor processes by UID 0 only:&lt;/td&gt;&lt;td&gt;top -U 0&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;fg _ _ _ _ _ _ _ _ _ _ _ _ _ _ run jobs in the foreground&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man fg &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Call a job that is suspended or is running in background to the foreground &lt;/td&gt;&lt;td&gt;ls -lahR / &amp;amp; &lt;br /&gt;
jobs &lt;br /&gt;
fg %1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;bg _ _ _ _ _ _ _ _ _ _ _ _ _ _ run jobs in the background&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To push a running process to the background&lt;br /&gt;
freeze it first: ctrl+z&lt;br /&gt;
this will produce %1 job identifier &lt;/td&gt;&lt;td&gt;bg %1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man bg &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gnome-system-monitor _ _ _ _ _ _ _ _ _ _ _ _ _ _ Simple process monitor&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;task manager for gnome, supports process management, load overviev,&lt;br /&gt;
disk usage status &lt;/td&gt;&lt;td&gt;gnome-system-monitor &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;top like graphical application. To start it and manipulate processes: &lt;/td&gt;&lt;td&gt;gnome-system-monitor&lt;br /&gt;
(use mouse right click to access possible options on processes) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;little bug if gnome-system-monitor does not start: &lt;/td&gt;&lt;td&gt;killall -9 dbus-daemon dbus-launch&lt;br /&gt;
gnome-system-monitor &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;pstree _ _ _ _ _ _ _ _ _ _ _ _ _ _ display a tree of processes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man pstree &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show process tree structure&lt;/td&gt;&lt;td&gt;pstree&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;on other unix-es&lt;/td&gt;&lt;td&gt;ptree&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show as much as possible infos&lt;/td&gt;&lt;td&gt;pstree -aAclpuZ&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show tree with processes numbers&lt;/td&gt;&lt;td&gt;pstree -p&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;chmod _ _ _ _ _ _ _ _ _ _ _ _ _ _ change file access permissions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;There are three permissions for files and directories.&lt;br /&gt;
&lt;br /&gt;
Set permissions:&lt;/td&gt;&lt;td&gt;reading (r)&lt;br /&gt;
&lt;br /&gt;
write (w)&lt;br /&gt;
&lt;br /&gt;
execute (x)&lt;br /&gt;
&lt;br /&gt;
for:&lt;br /&gt;
&lt;br /&gt;
users (u)&lt;br /&gt;
&lt;br /&gt;
group (g)&lt;br /&gt;
&lt;br /&gt;
others (o)&lt;br /&gt;
&lt;br /&gt;
chmod ugo+rwx directory1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove permits reading (r), write (w) and (x) access to users group&lt;br /&gt;
&lt;br /&gt;
(g) and others (o)&lt;/td&gt;&lt;td&gt;chmod go-rwx directory1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;There are aditiona three special parmissions available for files and directories:&lt;/td&gt;&lt;td&gt;STICKY 1000&lt;br /&gt;
&lt;br /&gt;
SGID 2000&lt;br /&gt;
&lt;br /&gt;
SUID 4000&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;A classic way to change permissions for user : read, write, execute&lt;br /&gt;
&lt;br /&gt;
for group : read, execute&lt;br /&gt;
&lt;br /&gt;
for others: read&lt;/td&gt;&lt;td&gt;chmod 754 /tmp/myprog&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;But what you really performed is:&lt;/td&gt;&lt;td&gt;chmod 0754 /tmp/myprog&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Access permissions table&lt;br /&gt;
&lt;br /&gt;
Permissions has a slightly different but significant meaning&lt;br /&gt;
&lt;br /&gt;
on files or directories.&lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;
     +------+-----------+-------------------+---------------------------------+
     | mode | notation  | file:             | directory                       |
     +------|-----------|-------------------+---------------------------------+
     | 1000 |---------T | save txt attr:    | link permissions: allow user to |
     |      |           |                   | operate on his own files only   |
     +------|-----------|-------------------+---------------------------------+
     | 2000 |------S--- | set Group ID:     | set Group ID: usable for samba. |
     |      |           |                   | file sharing among users.       |
     +------|-----------|-------------------+---------------------------------+
     | 4000 |           | set User ID:      | set User ID:                    |
     |      |---S------ | usable for suid   |                                 |
     |      |           | programs (passwd) |                                 |
     +------|-----------|-------------------+---------------------------------+
     |    1 |   --x     | execute           | browse                          |
     +------|-----------|-------------------+---------------------------------+
     |    2 |   r--     | read.             | list contents                   |
     +------|-----------|-------------------+---------------------------------+
     |    4 |   -w-     | write.            | create file                     |
     +------+-----------+-------------------+---------------------------------+
    &lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Add execute-by-user permission to file:&lt;/td&gt;&lt;td&gt;chmod u+x /tmp/testprog&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Either of the following will assign read/write/execute permission by owner&lt;br /&gt;
&lt;br /&gt;
r/x permission by group, and x-only permission by others to file:&lt;/td&gt;&lt;td&gt;chmod 751 /tmp/testprog chmod u=rwx,g=rx,o=x file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Any one of the following will assign r-only permission to file for everyone&lt;/td&gt;&lt;td&gt;chmod =r /tmp/testprog&lt;br /&gt;
&lt;br /&gt;
chmod 444 /tmp/testprog&lt;br /&gt;
&lt;br /&gt;
chmod a-wx,a+r /tmp/testprog&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;The following makes the executable setuid, assigns read/write/execute&lt;br /&gt;
&lt;br /&gt;
permission by owner, and assigns r/x permission by group and others&lt;/td&gt;&lt;td&gt;chmod 4755 /tmp/testprog&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Deny write permission to others:&lt;/td&gt;&lt;td&gt;chmod o-w file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make a file executable by everybody:&lt;/td&gt;&lt;td&gt;chmod a+x file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Assign read and execute permission to everybody, and set the set-user-ID bit:&lt;/td&gt;&lt;td&gt;chmod a=rx,u+s file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Assign read and write permission to the file owner, and read permission to everybody else:&lt;/td&gt;&lt;td&gt;chmod u=rw,go=r file&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set SUID bit on a binary file - the user that running that file&lt;br /&gt;
&lt;br /&gt;
gets same privileges as owner&lt;/td&gt;&lt;td&gt;chmod u+s /bin/file1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Disable SUID bit on a binary file&lt;/td&gt;&lt;td&gt;chmod u-s /bin/file1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set SGID bit on a directory - similar to SUID but for directory&lt;/td&gt;&lt;td&gt;chmod g+s /home/public&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Disable SGID bit on a directory&lt;/td&gt;&lt;td&gt;chmod g-s /home/public&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set STIKY bit on a directory - allows files deletion only to legitimate owners&lt;/td&gt;&lt;td&gt;chmod o+t /home/public&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Disable STIKY bit on a directory&lt;/td&gt;&lt;td&gt;chmod o-t /home/public&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see:&lt;/td&gt;&lt;td&gt;man chmod&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;date _ _ _ _ _ _ _ _ _ _ _ _ _ _ print or set the system date and time &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show system date and time: &lt;/td&gt;&lt;td&gt;date &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show UTC time: &lt;/td&gt;&lt;td&gt;date -u &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set date and tim in more human readable way: &lt;/td&gt;&lt;td&gt;date -s &quot;Sat Nov 3 18:59:04 2008&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Convert number of seconds since the epoch to a date: &lt;/td&gt;&lt;td&gt;date --date &#39;1970-01-01 UTC 1234567890 seconds&#39; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;What day does xmas fall on, this year: &lt;/td&gt;&lt;td&gt;date --date=&#39;20 Oct&#39; +%A &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;What date is it this thursday: &lt;/td&gt;&lt;td&gt;date -d thu &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set system date and time: &lt;/td&gt;&lt;td&gt;date 072315302007 # mmddHHMMyyyy &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To set the system clock forward by two minutes: &lt;/td&gt;&lt;td&gt;date --set=&#39;+2 minutes&#39; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;What time is it on West coast of US (use tzselect to find TZ): &lt;/td&gt;&lt;td&gt;TZ=&#39;:America/Los_Angeles&#39; date &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print custom formatted date: &lt;/td&gt;&lt;td&gt;date +%m-%d-%Y &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To print the date of the day before yesterday: &lt;/td&gt;&lt;td&gt;date --date=&#39;2 days ago&#39; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To print the date of the day three months and one day hence: &lt;/td&gt;&lt;td&gt;date --date=&#39;3 months 1 day&#39; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To print the day of year of Christmas in the current year: &lt;/td&gt;&lt;td&gt;date --date=&#39;25 Dec&#39; +%j &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Display date of the current or next Wednesday: &lt;/td&gt;&lt;td&gt;date -d Wed &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Give me file creation date:. &lt;/td&gt;&lt;td&gt;date -r /tmp/file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show yesterday&#39;s date: &lt;/td&gt;&lt;td&gt;echo $(date +%Y-%m-%d -d &#39;-1 day&#39;) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;for detailed options see: &lt;/td&gt;&lt;td&gt;man date &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To print a date without the leading zero for one-digit&lt;br /&gt;
days of the month, you can use the (GNU extension) &lt;br /&gt;
`-&#39; flag to suppress the padding altogether: &lt;/td&gt;&lt;td&gt;date -d 1may &#39;+%B %-d &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To print the current date and time in the format required &lt;br /&gt;
by many non-GNU ver.s of `date&#39; when setting the system clock: &lt;/td&gt;&lt;td&gt;date +%m%d%H%M%Y.%S &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;echo _ _ _ _ _ _ _ _ _ _ _ _ _ _ display a line of text &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man echo &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To clear console of gibberish (eg. after cat of a tar.gz file)&lt;br /&gt;
go to another virtual console and type in: &lt;/td&gt;&lt;td&gt;echo -e &#39;\017&#39; &amp;gt; /dev/tty1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print many variable fields in a single line: &lt;/td&gt;&lt;td&gt;listing=$(ls -la /)&lt;br /&gt;
echo $listing &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print values from variable &quot;as is&quot; &lt;/td&gt;&lt;td&gt;listing=$(ls -la /);echo &quot;$listing&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Base conver. (hex to dec) ((shell arithmetic expansion)) &lt;/td&gt;&lt;td&gt;echo $((0x2dec)) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Base math calcualtions &lt;/td&gt;&lt;td&gt;echo $((10+20)) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Create an empty file using echo &lt;/td&gt;&lt;td&gt;echo &amp;gt; /tmp/new_file1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Print a short beep &lt;/td&gt;&lt;td&gt;echo -e &quot;\a&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Start printing on position &quot;two tabs&quot; from start of the line &lt;/td&gt;&lt;td&gt;echo -en &quot;\t \t&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make cursor invisible &lt;/td&gt;&lt;td&gt;echo -en &quot;\033[?25l&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make cursor visible again &lt;/td&gt;&lt;td&gt;echo -en &quot;\033[?12l\033[?25h&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Switch terminal to DRAW mode &lt;/td&gt;&lt;td&gt;echo -en &quot;\033(0&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Switch terminal back to WRITE mode &lt;/td&gt;&lt;td&gt;echo -en &quot;\033(B&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mark text &lt;/td&gt;&lt;td&gt;echo -en &quot;\033[7m&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Unmark text &lt;/td&gt;&lt;td&gt;echo -en &quot;\033[27m&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Reset screen &lt;/td&gt;&lt;td&gt;echo -en &quot;\033c&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Simple counter with suppressing newlines &lt;/td&gt;&lt;td&gt;for NUM in $(seq 1 100)&lt;br /&gt;
do&lt;br /&gt;
echo -e &quot;\r $NUM \c&quot;&lt;br /&gt;
usleep 100000&lt;br /&gt;
done &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Painting text &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[44;37;5m ME \033[0m COOL&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Clear screen but preserver prompt position &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[2J&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Clear all keyboard LEDs &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[0q&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set &quot;Scroll Lock&quot; LED &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[1q&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set &quot;Num Lock&quot; LED &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[2q&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Set Caps Lock LED &lt;/td&gt;&lt;td&gt;echo -e &quot;\033[3q&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;beep &lt;/td&gt;&lt;td&gt;echo -en &quot;\x07&quot; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Colors &lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
0 reset all attributes to their defaults&lt;br /&gt;
&lt;br /&gt;
1 set bold&lt;br /&gt;
&lt;br /&gt;
2 set half-bright (simulated with color on a color display)&lt;br /&gt;
&lt;br /&gt;
4 set underscore (simulated with color on a color display)&lt;br /&gt;
&lt;br /&gt;
5 set blink&lt;br /&gt;
&lt;br /&gt;
7 set reverse video&lt;br /&gt;
&lt;br /&gt;
22 set normal intensity&lt;br /&gt;
&lt;br /&gt;
24 underline off&lt;br /&gt;
&lt;br /&gt;
25 blink off&lt;br /&gt;
&lt;br /&gt;
27 reverse video off&lt;br /&gt;
&lt;br /&gt;
30 set black foreground&lt;br /&gt;
&lt;br /&gt;
31 set red foreground&lt;br /&gt;
&lt;br /&gt;
32 set green foreground&lt;br /&gt;
&lt;br /&gt;
33 set brown foreground&lt;br /&gt;
&lt;br /&gt;
34 set blue foreground&lt;br /&gt;
&lt;br /&gt;
35 set magenta foreground&lt;br /&gt;
&lt;br /&gt;
36 set cyan foreground&lt;br /&gt;
&lt;br /&gt;
37 set white foreground&lt;br /&gt;
&lt;br /&gt;
38 set underscore on, set default foreground color&lt;br /&gt;
&lt;br /&gt;
39 set underscore off, set default foreground color&lt;br /&gt;
&lt;br /&gt;
40 set black background&lt;br /&gt;
&lt;br /&gt;
41 set red background&lt;br /&gt;
&lt;br /&gt;
42 set green background&lt;br /&gt;
&lt;br /&gt;
43 set brown background&lt;br /&gt;
&lt;br /&gt;
44 set blue background&lt;br /&gt;
&lt;br /&gt;
45 set magenta background&lt;br /&gt;
&lt;br /&gt;
46 set cyan background&lt;br /&gt;
&lt;br /&gt;
47 set white background&lt;br /&gt;
&lt;br /&gt;
49 set default background color&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;kill _ _ _ _ _ _ _ _ _ _ _ _ _ _ signal a process&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man kill &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;See for all available signals that can be used with kill &lt;/td&gt;&lt;td&gt;man 7 signal &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Force closure of the process and finish it &lt;/td&gt;&lt;td&gt;kill -9 ID_Process &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Force a process to reload configuration &lt;/td&gt;&lt;td&gt;kill -1 ID_Process &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Reload syslog service using kill command &lt;/td&gt;&lt;td&gt;kill SIGINT $(cat /var/run/syslogd.pid)&lt;br /&gt;
&lt;br /&gt;
kill -2 syslogd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Simulate killall command (kill all httpd processes) &lt;/td&gt;&lt;td&gt;kill $(ps -ef | grep httpd | awk &#39;{print $2}&#39;) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Terminate process many different ways &lt;/td&gt;&lt;td&gt;kill -s SIGKILL 1234&lt;br /&gt;
&lt;br /&gt;
kill -s KILL 1234&lt;br /&gt;
&lt;br /&gt;
kill -s 9 1234&lt;br /&gt;
&lt;br /&gt;
kill -SIGKILL 1234&lt;br /&gt;
&lt;br /&gt;
kill -KILL 1234&lt;br /&gt;
&lt;br /&gt;
kill -9 1234 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show all possible signals &lt;/td&gt;&lt;td&gt;kill -l &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IMPORTANT SGNALS TABLE &lt;/td&gt;&lt;td&gt;0 SIGNULL Null Check access to pid&lt;br /&gt;
&lt;br /&gt;
1 SIGHUP Hangup Terminate; can be trapped&lt;br /&gt;
&lt;br /&gt;
2 SIGINT Interrupt Terminate; can be trapped&lt;br /&gt;
&lt;br /&gt;
3 SIGQUIT Quit Terminate with core dump; can be trapped&lt;br /&gt;
&lt;br /&gt;
9 SIGKILL Kill Forced termination; cannot be trapped&lt;br /&gt;
&lt;br /&gt;
15 SIGTERM Terminate Terminate; can be trapped&lt;br /&gt;
&lt;br /&gt;
24 SIGSTOP Stop Pause the process; cannot be trapped&lt;br /&gt;
&lt;br /&gt;
25 SIGTSTP Terminal stop Pause the process; can be trapped&lt;br /&gt;
&lt;br /&gt;
26 SIGCONT Continue Run a stopped process &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;killall _ _ _ _ _ _ _ _ _ _ _ _ _ _ kill processes by name&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man killall &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;also see: &lt;/td&gt;&lt;td&gt;pkill &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Kill all similar processes by name &lt;br /&gt;
(if custom sh script runs of of control) &lt;/td&gt;&lt;td&gt;killall -9 bash sh &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;konqueror _ _ _ _ _ _ _ _ _ _ _ _ _ _ Web browser, file manager, ..&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Faster browsing &lt;/td&gt;&lt;td&gt;In KDE 3.2, a little-known but useful option has been added to speed up &lt;br /&gt;
your web browsing experience. Start the KDE Control Center and choose &lt;br /&gt;
System &amp;gt; KDE performance from the sidebar. You can now select to preload &lt;br /&gt;
Konqueror instances. Effectively, this means that Konqueror is run on &lt;br /&gt;
startup, but kept hidden until you try to use it. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Starting konqueror in kiosk mode: &lt;/td&gt;&lt;td&gt;konqueror --profile KIOSK https://localhost:10000 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;define profile KIOSK: &lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
vi /root/.kde/share/apps/konqueror/profiles/KIOSK&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings]&lt;br /&gt;
&lt;br /&gt;
MenuBar=Disabled&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar Speech Toolbar]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar bookmarkToolBar]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar extraToolBar]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar locationToolBar]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar mainToolBar]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Main Window Settings Toolbar mainMenu]&lt;br /&gt;
&lt;br /&gt;
Hidden=true&lt;br /&gt;
&lt;br /&gt;
[Profile]&lt;br /&gt;
&lt;br /&gt;
FullScreen=false&lt;br /&gt;
&lt;br /&gt;
Name=KIOSK&lt;br /&gt;
&lt;br /&gt;
RootItem=Tabs0&lt;br /&gt;
&lt;br /&gt;
Tabs0_Children=ViewT0&lt;br /&gt;
&lt;br /&gt;
Tabs0_activeChildIndex=0&lt;br /&gt;
&lt;br /&gt;
ViewT0_LinkedView=false&lt;br /&gt;
&lt;br /&gt;
ViewT0_LockedLocation=false&lt;br /&gt;
&lt;br /&gt;
ViewT0_PassiveMode=false&lt;br /&gt;
&lt;br /&gt;
ViewT0_ServiceName=khtml&lt;br /&gt;
&lt;br /&gt;
ViewT0_ServiceType=text/html&lt;br /&gt;
&lt;br /&gt;
ViewT0_ToggleView=false&lt;br /&gt;
&lt;br /&gt;
ViewT0_URL=about:blank&lt;br /&gt;
&lt;br /&gt;
XMLUIFile=konqueror-kiosk.rc&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;man _ _ _ _ _ _ _ _ _ _ _ _ _ _ display system doc&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man man &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;biggest man pages collections on web&lt;/td&gt;&lt;td&gt;http://man.cx&lt;br /&gt;
&lt;br /&gt;
http://www.die.net/doc/linux/man/ &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;show man on ls command&lt;/td&gt;&lt;td&gt;man ls &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;list all available man pages on the system&lt;/td&gt;&lt;td&gt;man -k [aeiou]|sort|uniq&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get manual pages that start with man (similar to whatis)&lt;/td&gt;&lt;td&gt;man -f man&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;To get a plain text ver. of a man page, without backspaces and&lt;br /&gt;
&lt;br /&gt;
underscores, try&lt;/td&gt;&lt;td&gt;man find | col -b &amp;gt; find.txt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;How to write man pages&lt;/td&gt;&lt;td&gt;http://www.cs.hmc.edu/qref/writing_man_pages.html&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Get a custom breaked lines from man pages output:&lt;/td&gt;&lt;td&gt;unset LANG&lt;br /&gt;
&lt;br /&gt;
(echo &quot;.nr LL 18.i&quot;; zcat &#39;/usr/share/man/man8/yum.8.gz&#39;)|&lt;br /&gt;
&lt;br /&gt;
gtbl | nroff -mandoc |col -b&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make man pages immune to local codepage set:&lt;br /&gt;
&lt;br /&gt;
/etc/man.config:&lt;/td&gt;&lt;td&gt;NROFF /usr/bin/groff -Tlatin1 -mandoc&lt;br /&gt;
&lt;br /&gt;
NEQN /usr/bin/geqn -Tlatin1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Where are the GNU Reference Manuals?&lt;/td&gt;&lt;td&gt;http://www.gnu.org/manual/manual.html&lt;br /&gt;
&lt;br /&gt;
http://en.tldp.org/&lt;br /&gt;
&lt;br /&gt;
http://www.redhat.com/docs/manuals/enterprise/&lt;br /&gt;
&lt;br /&gt;
http://www.linuxcommand.org/superman_pages.php&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;If man pages are formatting incorrectly with PuTTY, try editing&lt;/td&gt;&lt;td&gt;the &quot;/etc/man.config&quot; file with the following changes:&lt;br /&gt;
&lt;br /&gt;
NROFF /usr/bin/groff -Tlatin1 -mandoc&lt;br /&gt;
&lt;br /&gt;
NEQN /usr/bin/geqn -Tlatin1&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Creating a Manpage&lt;/td&gt;&lt;td&gt;As root you can copy the following to&lt;br /&gt;
&lt;br /&gt;
/usr/local/man/man1/examples.1&lt;br /&gt;
&lt;br /&gt;
which will give you a manpage for examples:&lt;br /&gt;
&lt;br /&gt;
.\&quot; Manpage for examples.&lt;br /&gt;
&lt;br /&gt;
.\&quot; Contact om8000@hotmail.com to correct errors or omissions.&lt;br /&gt;
&lt;br /&gt;
.TH man 1 &quot;examples&quot;&lt;br /&gt;
&lt;br /&gt;
.SH NAME&lt;br /&gt;
&lt;br /&gt;
examples \- man page for examples&lt;br /&gt;
&lt;br /&gt;
.SH SYNOPSIS&lt;br /&gt;
&lt;br /&gt;
examples&lt;br /&gt;
&lt;br /&gt;
.SH DESCRIPTION&lt;br /&gt;
&lt;br /&gt;
collection of linux and open source tips.&lt;br /&gt;
&lt;br /&gt;
.SH OPTIONS&lt;br /&gt;
&lt;br /&gt;
no options.&lt;br /&gt;
&lt;br /&gt;
.SH SEE ALSO&lt;br /&gt;
&lt;br /&gt;
ls(1), ps(8)&lt;br /&gt;
&lt;br /&gt;
.SH BUGS&lt;br /&gt;
&lt;br /&gt;
No known bugs at this time.&lt;br /&gt;
&lt;br /&gt;
.SH AUTHOR&lt;br /&gt;
&lt;br /&gt;
oTo (om8000@hotmail.com )&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;man pages sections&lt;/td&gt;&lt;td&gt;1 user commands, general commands&lt;br /&gt;
&lt;br /&gt;
2 system calls&lt;br /&gt;
&lt;br /&gt;
3 library functions, Subroutines&lt;br /&gt;
&lt;br /&gt;
4 special files&lt;br /&gt;
&lt;br /&gt;
5 file formats&lt;br /&gt;
&lt;br /&gt;
6 games and demos&lt;br /&gt;
&lt;br /&gt;
7 macros and conventions&lt;br /&gt;
&lt;br /&gt;
8 administration and privileged commands&lt;br /&gt;
&lt;br /&gt;
9 kernel interfce&lt;br /&gt;
&lt;br /&gt;
L math library functions&lt;br /&gt;
&lt;br /&gt;
N tcl functions&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;also see command below for fast simple man page generation:&lt;/td&gt;&lt;td&gt;txt2tags&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;man2ps - requires postscript installed&lt;/td&gt;&lt;td&gt;man -t manpage &amp;gt; manpage.ps&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;mount _ _ _ _ _ _ _ _ _ _ _ _ _ _ connect filesystems&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man mount &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show mounted filesystems on the system (and align output)&lt;/td&gt;&lt;td&gt;mount&lt;br /&gt;
&lt;br /&gt;
mount | column -t&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount the cdrom image at /mnt/dir (read only)&lt;/td&gt;&lt;td&gt;mount -o loop cdrom.iso /mnt/dir&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a windows share&lt;/td&gt;&lt;td&gt;mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a windows network share&lt;/td&gt;&lt;td&gt;mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mounting iso image file&lt;/td&gt;&lt;td&gt;mount -o loop /tmp/test.iso /mnt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mounting a /proc filesystem easy way:&lt;/td&gt;&lt;td&gt;mount /proc&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;hard way (if easy one fails):&lt;/td&gt;&lt;td&gt;mount -n -t proc proc /proc&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mountan iso image file:&lt;/td&gt;&lt;td&gt;mount -o loop -t iso9660 /img.iso /mnt&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Make iso image auto mount at boot time:&lt;br /&gt;
&lt;br /&gt;
Put the following into /etc/fstab&lt;/td&gt;&lt;td&gt;/img.iso /mnt iso9660 ro,loop 0 0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remount readonly filesystem:&lt;/td&gt;&lt;td&gt;mount -o remount,rw /&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount ext2 formatteed floppy&lt;/td&gt;&lt;td&gt;mount -t ext2 /dev/fd0 /mnt/floppy&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a floppy disk&lt;/td&gt;&lt;td&gt;mount /dev/fd0 /mnt/floppy&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a cdrom / dvdrom&lt;/td&gt;&lt;td&gt;mount /dev/cdrom /mnt/cdrom&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a cdrw / dvdrom&lt;/td&gt;&lt;td&gt;mount /dev/hdc /mnt/cdrecorder&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a cdrw / dvdrom&lt;/td&gt;&lt;td&gt;mount /dev/hdb /mnt/cdrecorder&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a file or iso image&lt;/td&gt;&lt;td&gt;mount -o loop file.iso /mnt/cdrom&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a WIN FAT32 file system&lt;/td&gt;&lt;td&gt;mount -t vfat /dev/hda5 /mnt/hda5&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mount a usb pen-drive or flash-drive&lt;/td&gt;&lt;td&gt;mount /dev/sda1 /mnt/usbdisk&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Mounting old outdated zip drives&lt;br /&gt;
&lt;br /&gt;
If ZIP drive has been recognised by the kernel ... (dmesg)&lt;/td&gt;&lt;td&gt;modprobe ide-floppy&lt;br /&gt;
&lt;br /&gt;
mount /dev/hdaN /mnt/floppy&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;mkpasswd _ _ _ _ _ _ _ _ _ _ _ _ _ _ generate new random password &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man mkpasswd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Creating random password example: &lt;/td&gt;&lt;td&gt;mkpasswd -l 9 -d 2 -C 3 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;passwd _ _ _ _ _ _ _ _ _ _ _ _ _ _ setting/changing passwords &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see: &lt;/td&gt;&lt;td&gt;man passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Show all /etc/passwd users command prompt: &lt;/td&gt;&lt;td&gt;~&amp;lt; tab &amp;gt;&amp;lt; tab &amp;gt; &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Change password for the current user: &lt;/td&gt;&lt;td&gt;passwd &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lock an account as root user (insert &#39;!!&#39; in password place): &lt;/td&gt;&lt;td&gt;passwd -l user1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Change password for another user (as root): &lt;/td&gt;&lt;td&gt;passwd user1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Remove user password: &lt;/td&gt;&lt;td&gt;passwd -d user1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Lost password: &lt;/td&gt;&lt;td&gt;Log in to Single user mode. At the LILO boot prompt type in :&lt;br /&gt;
linux 1 init=/bin/sh root=/dev/hdaN mount rw &lt;br /&gt;
(where N is the number of your root partition).&lt;br /&gt;
Then change the password for root with the command:&lt;br /&gt;
passwd&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;umount _ _ _ _ _ _ _ _ _ _ _ _ _ _ disconnect filesystems&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;For detailed options see:&lt;/td&gt;&lt;td&gt;man umount &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Umount mounted filesystem&lt;/td&gt;&lt;td&gt;umount /mnt/cdrom&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Run umount without writing the file /etc/mtab - useful when&lt;br /&gt;
&lt;br /&gt;
the file is read-only or the hard disk is full&lt;/td&gt;&lt;td&gt;umount -n /mnt/hda2&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;vi _ _ _ _ _ _ _ _ _ _ _ _ _ _ visual interactive&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;vi cheat sheet &lt;/td&gt;&lt;td&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: xx-small;&quot;&gt;
    vi Cheat Sheet
    :--------------------------------------------------:  :-----------------:
    | COMMAND MODE                                     |  |                 |
    |                                                  |  |                 |
    |  :--------[coomand mode to edit mode]---------:  |  |                 |
    |  |        I          i [] a         A         |--+--+--&amp;gt; EDIT MODE    |
    |  `--------------------------------------------´  |  |    text typing  |
    |                                                  |  |        |        |
    |  cut, copy, paste    join lines  cursor move     |  |        |        |
    |  :---------------:   :----:      :------------:  |  |        |        |
    |  | dd  yy    p   |   | J  |      |     1G     |  |  |     back to     |
    |  `---------------´   `----´      |     k      |  |  |     command     |
    |                                  | ^ h [] l $ |  |  |     mode        |
    |  delete char,word    save+exit   |      j     |  |  |        |        |
    |  :--------------:    :-------:   |      G     |  |  |      [ESC]      |
    |  | x    X    dw |    |  ZZ   |   `------------´  |  |        |        |
    |  `--------------´    `-------´                 &amp;lt;-+--+--------´        |
    |                                   onetime        |  |                 |
    |  ex mode   search, repeat         undo,redo      |  |                 |
    |  :----:    :----------------:     :--------:     |  |                 |
    |  | :  |    |  /    n        |     | u  .   |     |  |                 |
    |  `----´    `----------------´     `--------´     |  |                 |
    |     |                                 ^          |  |                 |
    `-----|---------------------------------|----------´  `-----------------´
          |                                 |
    :-----|---------------------------------|----------:
    | EX MODE                               |          |
    |                                  :----+------:   |
    |  search &amp;amp; replace                |  [esc]    |   |
    |  :-----------------:             |  [enter]  |   |
    |  | :%s /old/new/g  |             `-----------´   |
    |  `-----------------´                             |
    |                                                  |
    |  change settings    save, exit                   |
    |  :-------------:    :-------------------------:  |
    |  | :set ...    |    | :w :w! :q :q! :wq :x    |  |
    |  `-------------´    `-------------------------´  |
    |                                                  |
    `--------------------------------------------------´
&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;wc _ _ _ _ _ _ _ _ _ _ _ _ _ _ print the number of newlines, words, and bytes in files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;webmin _ _ _ _ _ _ _ _ _ _ _ _ _ _ A web-based administration interface for Unix systems. &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;whereis _ _ _ _ _ _ _ _ _ _ _ _ _ _ locate the binary, source, and manual page files for a command &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;which _ _ _ _ _ _ _ _ _ _ _ _ _ _ shows the full path of (shell) commands &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;while _ _ _ _ _ _ _ _ _ _ _ _ _ _ Execute script repeatedly as long as a condition is met &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;X _ _ _ _ _ _ _ _ _ _ _ _ _ _ graphical - GUI server &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;xmms _ _ _ _ _ _ _ _ _ _ _ _ _ _ an audio player for X &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;Xorg _ _ _ _ _ _ _ _ _ _ _ _ _ _ X11R6 X server &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;yast _ _ _ _ _ _ _ _ _ _ _ _ _ _ Yet another Setup Tool control panel for SuSE &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;zcat _ _ _ _ _ _ _ _ _ _ _ _ _ _ expand and concatenate data &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;alias _ _ _ _ _ _ _ _ _ _ _ _ _ _ define or display aliases &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;awk _ _ _ _ _ _ _ _ _ _ _ _ _ _ pattern scanning and processing language &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;cut _ _ _ _ _ _ _ _ _ _ _ _ _ _ remove sections from each line of files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;do _ _ _ _ _ _ _ _ _ _ _ _ _ _ if loop/case construct keyword &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;done _ _ _ _ _ _ _ _ _ _ _ _ _ _ end of do loop &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;dhclient _ _ _ _ _ _ _ _ _ _ _ _ _ _ Dynamic Host Configuration Protocol Client &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;egrep _ _ _ _ _ _ _ _ _ _ _ _ _ _ print lines matching a pattern &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;else _ _ _ _ _ _ _ _ _ _ _ _ _ _ conditional operator &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;expand _ _ _ _ _ _ _ _ _ _ _ _ _ _ convert tabs to spaces &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;export _ _ _ _ _ _ _ _ _ _ _ _ _ _ set the export attribute for variables &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;expr _ _ _ _ _ _ _ _ _ _ _ _ _ _ evaluate expressions &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;fgrep _ _ _ _ _ _ _ _ _ _ _ _ _ _ print lines matching a pattern &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;fi _ _ _ _ _ _ _ _ _ _ _ _ _ _ end of if-loop/condition construct &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;file _ _ _ _ _ _ _ _ _ _ _ _ _ _ Figure out what is in an archive file &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;find _ _ _ _ _ _ _ _ _ _ _ _ _ _ search for files in a directory hierarchy &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;fmt _ _ _ _ _ _ _ _ _ _ _ _ _ _ simple optimal text formatter &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;for _ _ _ _ _ _ _ _ _ _ _ _ _ _ loop construct &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gnome _ _ _ _ _ _ _ _ _ _ _ _ _ _ The Gnome desktop &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gnome-control-center _ _ _ _ _ _ _ _ _ _ _ _ _ _ control panel for Gnome &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gnome-sound-properties _ _ _ _ _ _ _ _ _ _ _ _ _ _ sound configurator &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;grep _ _ _ _ _ _ _ _ _ _ _ _ _ _ print lines matching a pattern &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gtv _ _ _ _ _ _ _ _ _ _ _ _ _ _ MP3 and video (MPEG-1) player with GTK+ GUI &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gunzip _ _ _ _ _ _ _ _ _ _ _ _ _ _ compress or expand files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;gzip _ _ _ _ _ _ _ _ _ _ _ _ _ _ compress or expand files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;head _ _ _ _ _ _ _ _ _ _ _ _ _ _ output the first part of files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;if _ _ _ _ _ _ _ _ _ _ _ _ _ _ use a Perl module if a condition holds &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;ifconfig _ _ _ _ _ _ _ _ _ _ _ _ _ _ configure a network interface &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;init _ _ _ _ _ _ _ _ _ _ _ _ _ _ process control initialization &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;jobs _ _ _ _ _ _ _ _ _ _ _ _ _ _ display status of jobs in the current session &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;join _ _ _ _ _ _ _ _ _ _ _ _ _ _ join lines of two files on a common field &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;kcontrol _ _ _ _ _ _ _ _ _ _ _ _ _ _ kde Control center &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;kde _ _ _ _ _ _ _ _ _ _ _ _ _ _ KDE Desktop environment &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;kmix _ _ _ _ _ _ _ _ _ _ _ _ _ _ audio mixer for KDE &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;kpm _ _ _ _ _ _ _ _ _ _ _ _ _ _ Process manager for KDE &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;let _ _ _ _ _ _ _ _ _ _ _ _ _ _ bash built-in commands, see bash(1) &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;locate _ _ _ _ _ _ _ _ _ _ _ _ _ _ find files by name &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;neat _ _ _ _ _ _ _ _ _ _ _ _ _ _ network configurator &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;neat-tui _ _ _ _ _ _ _ _ _ _ _ _ _ _ tui network configurator &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;nice _ _ _ _ _ _ _ _ _ _ _ _ _ _ run a program with modified scheduling priority &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;nl _ _ _ _ _ _ _ _ _ _ _ _ _ _ number lines of files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;noatun _ _ _ _ _ _ _ _ _ _ _ _ _ _ music player for KDE &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;paste _ _ _ _ _ _ _ _ _ _ _ _ _ _ merge lines of files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;pr _ _ _ _ _ _ _ _ _ _ _ _ _ _ convert text files for printing &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;ps _ _ _ _ _ _ _ _ _ _ _ _ _ _ report a snapshot of the current processes &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;read _ _ _ _ _ _ _ _ _ _ _ _ _ _ read a line from standard input &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;renice _ _ _ _ _ _ _ _ _ _ _ _ _ _ alter priority of running processes &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;rpm _ _ _ _ _ _ _ _ _ _ _ _ _ _ a perl only implementaion of a RPM header reader &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;sed _ _ _ _ _ _ _ _ _ _ _ _ _ _ stream editor for filtering and transforming text &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;shift _ _ _ _ _ _ _ _ _ _ _ _ _ _ shift positional parameters &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;sort _ _ _ _ _ _ _ _ _ _ _ _ _ _ Sorting and merging lists &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;source _ _ _ _ _ _ _ _ _ _ _ _ _ _ Evaluate a file or resource as a Tcl script &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;startix _ _ _ _ _ _ _ _ _ _ _ _ _ _ starting X server from console &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;stat _ _ _ _ _ _ _ _ _ _ _ _ _ _ show detailed information on file attributes &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;switchdesk _ _ _ _ _ _ _ _ _ _ _ _ _ _ GUI and TUI mode interface for choosing desktop environment &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;system-config-display _ _ _ _ _ _ _ _ _ _ _ _ _ _ GUI configuring the X Window System display &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;system-config-network _ _ _ _ _ _ _ _ _ _ _ _ _ _ The GUI of the NEtwork Adminstration Tool &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;system-config-network-tui _ _ _ _ _ _ _ _ _ _ _ _ _ _ The NEtwork Adminstration Tool &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;system-config-printer _ _ _ _ _ _ _ _ _ _ _ _ _ _ A printer administration tool &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;system-config-soundcard _ _ _ _ _ _ _ _ _ _ _ _ _ _ GUI for detecting and configuring soundcards &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;tac _ _ _ _ _ _ _ _ _ _ _ _ _ _ concatenate and print files in reverse &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;tail _ _ _ _ _ _ _ _ _ _ _ _ _ _ output the last part of files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;tar _ _ _ _ _ _ _ _ _ _ _ _ _ _ The GNU version of the tar archiving utility &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;tee _ _ _ _ _ _ _ _ _ _ _ _ _ _ read from standard input and write to standard output and files &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;telinit _ _ _ _ _ _ _ _ _ _ _ _ _ _ process control initialization &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;test _ _ _ _ _ _ _ _ _ _ _ _ _ _ provides a simple framework for writing test scripts &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;then _ _ _ _ _ _ _ _ _ _ _ _ _ _ conditional if loop construct &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;tr _ _ _ _ _ _ _ _ _ _ _ _ _ _ translate or delete characters &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;true _ _ _ _ _ _ _ _ _ _ _ _ _ _ do nothing, successfully &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;type _ _ _ _ _ _ _ _ _ _ _ _ _ _ write a description of command type &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;unexpand _ _ _ _ _ _ _ _ _ _ _ _ _ _ convert spaces to tabs &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;table cellspacing=&quot;0&quot; class=&quot;stats&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;hed&quot; colspan=&quot;4&quot;&gt;updatedb _ _ _ _ _ _ _ _ _ _ _ _ _ _ update database for whatis command &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;c1 &lt;/td&gt;&lt;td&gt;d1 &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/center&gt;
&lt;center&gt;
&lt;br /&gt;
&lt;/center&gt;
</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/2157477075796871107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2011/01/shell-commands.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/2157477075796871107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/2157477075796871107'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2011/01/shell-commands.html' title='SHELL COMMANDS'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-1225457909369983852</id><published>2011-01-03T11:09:00.002+01:00</published><updated>2023-07-01T14:54:17.943+02:00</updated><title type='text'>The power of echo command: Bash console drawing methods and some usefull tput-like functions</title><content type='html'>&lt;style&gt;
   .code {background: #ffe; border: 1px solid #960; padding: 1em; overflow: auto; font-size=11px;}
    body {font-family:helvetica;font-size:12px;}
  
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Have you ever try to write some fancy output that will knock off your co-workers?&lt;br /&gt;
Yes you will say, no problem, but have you used Bash to do that? &lt;br /&gt;
Have you ever tried to do some menus and graphics under bash?&lt;br /&gt;
Yes you will say again, &#39;dialog&#39; is the right choice for such a task.&lt;br /&gt;
But I am very stubborn and I want pure Bash, no external programs, but still some menus and graphics,&lt;br /&gt;
and if possible no external programs at all.&lt;br /&gt;
And I want at least so much capabilities to be able to build a simple boxes with some colored text. &lt;br /&gt;
Is it possible?&lt;br /&gt;
Well if you tried to do you homework, you definitely came to some&lt;br /&gt;
death end, because bash manual page is not very explanatory on that issue.&lt;br /&gt;
But I want to have some old-style text-mode graphics, menus and perhaps message boxes. &lt;br /&gt;
And I want to be able to put text where-ever I want on my console.&lt;br /&gt;
You would be surprised if I tell you, that most of that can be done with a simple &#39;echo&#39;&lt;br /&gt;
command which is also Bash-builtin.&lt;br /&gt;
&lt;h5&gt;
How I did it&lt;/h5&gt;
A few years ago my boss tried to convince me that curses library is the only&lt;br /&gt;
possible option to produce something fancy on my terminal. But once I opened RedHat&#39;s&lt;br /&gt;
/etc/init.d/functions file and extracted option for positioning characters at&lt;br /&gt;
the current line but at the custom column. I thought - if this is possible, what&lt;br /&gt;
else can be done with this nice echo command?&lt;br /&gt;
My next step was to run RedHat Setup program and redirect it to an ordinary text file. &lt;br /&gt;
That one took me some time. What I&#39;ve got was a bunch of unreadable characters&lt;br /&gt;
that should be responsible for drawing something to the screen. But how? I was confused&lt;br /&gt;
for many months. No documentation available or I just did not know how to search for it.&lt;br /&gt;
Then I played around with different options the way I deleted part by part of &#39;garbage&#39; file&lt;br /&gt;
produced with some tui aplication outputs and I found out how to switch between&lt;br /&gt;
writing and drawing mode at the command line. That one was a real break on my&lt;br /&gt;
path of creating some simple pure Bash menu lines.&lt;br /&gt;
At the end I redirected some ncurses programs to an empty file and observed what happened.&lt;br /&gt;
I ofcource tried many other combinations that work on some terminals, but below is&lt;br /&gt;
my result, that should work on most terminal emulators used today.&lt;br /&gt;
So, yes you will also need terminal emulator, that supports codes below.&lt;br /&gt;
I tested all that stuff on putty and at the Linux console.&lt;br /&gt;
&lt;h5&gt;
Step by step&lt;/h5&gt;
Right here before you are some not very self-explanatory,&lt;br /&gt;
small and usefull functions.&lt;br /&gt;
But do not worry, I will explain everything to you. &lt;br /&gt;
I will also show you step by step, how you can make those&lt;br /&gt;
functions usefull for fancy bash programming.&lt;br /&gt;
&lt;h5&gt;
The Power of echo command&lt;/h5&gt;
We will start with a simple echo.&lt;br /&gt;
Echo can be as powerfull as you can&#39;t even imagine. &lt;br /&gt;
Just use it with an &#39;escape&#39; character and extended&lt;br /&gt;
option and it will print for you allmost anything.&lt;br /&gt;
This &#39;echo&#39; commad is also bash internal, builtin.&lt;br /&gt;
So things just could not get any better.&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;
Creating Custom ESCAPE character&lt;/h5&gt;
It is mentioned in many manual pages but I did not understood the meaning&lt;br /&gt;
of it at he beginning. With the simple words: to make&lt;br /&gt;
some characters behave special way, you should put an ESC character infront&lt;br /&gt;
of them. ESC character is a single character that takes two places. So it &lt;br /&gt;
is impossible just to enter it over keyboard. This is known &#39;echo&#39; feature and&lt;br /&gt;
makes echo a very powerfull command.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033&quot;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h5&gt;
Creating Custom Function CLEAR&lt;/h5&gt;
For start we need a clean screen to work on.&lt;br /&gt;
Replacement for &#39;tput clear&#39; can be simply performed&lt;br /&gt;
just by executing &#39;clear&#39; command.&lt;br /&gt;
But I want to be sure just to use bash internals.&lt;br /&gt;
So I created a simple echo command, that produces screen erasing.&lt;br /&gt;
Escape character in combination with &#39;c&#39; character will do the work for us.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033c&quot;
&lt;/pre&gt;
&lt;h5&gt;
Creating Custom Function CIVIS&lt;/h5&gt;
To create programs with a more realistic look, sometimes it&lt;br /&gt;
is nice to hide cursor character.&lt;br /&gt;
Replacement for &#39;tput civis&#39; is reverse engineered.&lt;br /&gt;
I typed tput civis and redirected an output to an ordinary text file.&lt;br /&gt;
Then I looked inside using vi editor. And here it is.&lt;br /&gt;
It will hide your cursor just as good as a real &#39;tput civis&#39;.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[?25l&quot;
&lt;/pre&gt;
&lt;h5&gt;
Creating Custom Function CNORM&lt;/h5&gt;
Replacement for &#39;tput cnorm&#39; was created with the same method as command above.&lt;br /&gt;
Its function is to make cursor visiible again.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[?12l\033[?25h&quot;
&lt;/pre&gt;
&lt;h5&gt;
Creating Custom Function TPUT&lt;/h5&gt;
Replacement for &#39;tput cup&#39; should put your cursor anywhere on your terminal.&lt;br /&gt;
This can be also easily performed using syntax: echo -en &quot;\033[10:10H&quot;.&lt;br /&gt;
But since I want to be able to specify my own x and y coordinates I am using&lt;br /&gt;
positional parameters ${1} and ${2} which will save my custom console input&lt;br /&gt;
and transform it into something usefull.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[${1};${2}H&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function COLPUT&lt;/h5&gt;
RedHat function for column put. This one was hacked from RedHat functions file.&lt;br /&gt;
Function is responsible for start writing at the exact position on the current &lt;br /&gt;
line without calculating in which line is cursor currently positioned. RedHat &lt;br /&gt;
is using it to display services statuses at startup process.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[${1}G&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function MARK&lt;/h5&gt;
Replacement for &#39;tput smso&#39; should reverse background color around typed text.&lt;br /&gt;
I found it the way I simply tested all numbers from 0 to 50. Some were very&lt;br /&gt;
interesting but this was the only one more or less working on most terminal&lt;br /&gt;
emulators.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[7m&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function UNMARK&lt;/h5&gt;
Replacement for &#39;tput rmso&#39; that returns selected text back to&lt;br /&gt;
normal is created as easily as previous function.&lt;br /&gt;
All you need to change is background color back to default (27m).&lt;br /&gt;
The code below will do the trick:&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033[27m&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function DRAW&lt;/h5&gt;
This one along with function DRAW I discovered trying out a bunch of code, that RedHat&#39;s&lt;br /&gt;
&#39;setup&#39; creates when output is redirected into a file.&lt;br /&gt;
When I was seeking for a decend background coloring piece, some garbage came to my screen.&lt;br /&gt;
I did not realise at first what this is good for and I thougt it is some console bug.&lt;br /&gt;
But after short test it became clear to me that this garbage is actually simple line &lt;br /&gt;
drawing and will be very usefull. To be sure to work also on other linux distributions with&lt;br /&gt;
some different terminal settings, some RedHat&#39;s black magic &#39;&lt;b&gt;%@&lt;/b&gt;&#39; is needed. This &lt;br /&gt;
will load default console font with special characters that you will need to draw&lt;br /&gt;
lines. If not done so, small case characters could be interpreted wrongly. So now we need&lt;br /&gt;
to combine &#39;font switching&#39; and &#39;draw&#39; mode as two separated commands. I tried to combine&lt;br /&gt;
them into one, and so can you, but sometimes the result is not satisfactory.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033%@&quot;;echo -en &quot;\033(0&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function WRITE&lt;/h5&gt;
When I found &#39;drawing&#39; mode I also wanted a simple &#39;return to writing&#39; mode.&lt;br /&gt;
Painfull testing method followed.&lt;br /&gt;
I tried all letters and numbers and I succeeded!&lt;br /&gt;
A very short code below will switch from so called &#39;garbaged&#39; console back to normal.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033(B&quot;
&lt;/pre&gt;
&lt;h5&gt;
Custom Function BLUE&lt;/h5&gt;
To be short I just named it blue.&lt;br /&gt;
But it can be easily turned into some other background color.&lt;br /&gt;
Search for string &lt;b&gt;44m&lt;/b&gt; and replace it with some of strings listed below.&lt;br /&gt;
Result should be impressive.&lt;br /&gt;
If not, your terminal does not support this kind of coloring.&lt;br /&gt;
What I did is actually very simple. &lt;br /&gt;
I reset screen (&lt;b&gt;\033c&lt;/b&gt;), I set white color for font and&lt;br /&gt;
blue for background (&lt;b&gt;[37;44m&lt;/b&gt;) and at the end &lt;br /&gt;
I want to apply all of this to the whole screen not only&lt;br /&gt;
to my current row (&lt;b&gt;[J&lt;/b&gt;).&lt;br /&gt;
Select the following codes: &lt;b&gt;40m&lt;/b&gt; for black, &lt;b&gt;41m&lt;/b&gt; for red,&lt;br /&gt;
&lt;b&gt;42m&lt;/b&gt; for dark green, &lt;b&gt;43m&lt;/b&gt; for light green, &lt;b&gt;44m&lt;/b&gt; for blue,&lt;br /&gt;
&lt;b&gt;45m&lt;/b&gt; for pink, &lt;b&gt;46m&lt;/b&gt; for green and &lt;b&gt;47m&lt;/b&gt; for gray.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;echo -en &quot;\033c\033[1;44m\033[J&quot;
&lt;/pre&gt;
&lt;br /&gt;
&lt;h5&gt;
Putting it all together&lt;/h5&gt;
Here is an example of how to create a true bash functions.&lt;br /&gt;
To be always ready, put those function (or the ones you need)&lt;br /&gt;
to the start of your every bash script.&lt;br /&gt;
This way you will fasten your fancy Bash coding.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;ESC(){ echo -en &quot;\033&quot;;}                            # escape character
 CLEAR(){ echo -en &quot;\033c&quot;;}                           # the same as &#39;tput clear&#39;
 CIVIS(){ echo -en &quot;\033[?25l&quot;;}                       # the same as &#39;tput civis&#39;
 CNORM(){ echo -en &quot;\033[?12l\033[?25h&quot;;}              # the same as &#39;tput cnorm&#39;
  TPUT(){ echo -en &quot;\033[${1};${2}H&quot;;}                 # the same as &#39;tput cup&#39;
COLPUT(){ echo -en &quot;\033[${1}G&quot;;}                      # put text in the same line as the specified column
  MARK(){ echo -en &quot;\033[7m&quot;;}                         # the same as &#39;tput smso&#39;
UNMARK(){ echo -en &quot;\033[27m&quot;;}                        # the same as &#39;tput rmso&#39;
  DRAW(){ echo -en &quot;\033%@&quot;;echo -en &quot;\033(0&quot;;}        # switch to &#39;garbage&#39; mode
 WRITE(){ echo -en &quot;\033(B&quot;;}                          # return to normal mode from &#39;garbage&#39; on the screen
  BLUE(){ echo -en &quot;\033c\033[0;1m\033[37;44m\033[J&quot;;} # reset screen, set background to blue and font to white
&lt;/pre&gt;
&lt;h5&gt;
Some real life examples using functions above&lt;/h5&gt;
Now you have all those functions but you still do not know&lt;br /&gt;
how to use them? Let me start with some nice examples and&lt;br /&gt;
show you some nice tricks.&lt;br /&gt;
&lt;h5&gt;
Box with a simple progress indicator&lt;/h5&gt;
&lt;br /&gt;
&lt;table style=&quot;background: blue; border: 0px solid rgb(0, 0, 0); overflow: auto; padding: 1em; width: 400px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;table style=&quot;background: blue; border: 1px solid rgb(187, 187, 187); overflow: auto; padding: 1em;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;color: white;&quot;&gt;EXECUTING IN PROGRESS: &amp;nbsp;&amp;nbsp;&amp;nbsp; / &amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
Example shown above can be used in any program that will&lt;br /&gt;
take some time to execute. &lt;br /&gt;
Code will perform the following tasks:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;clear screen (optional)&lt;/li&gt;
&lt;li&gt;paint screen (optional)&lt;/li&gt;
&lt;li&gt;hide cursor&lt;/li&gt;
&lt;li&gt;enable drawing mode&lt;/li&gt;
&lt;li&gt;draw fancy box&lt;/li&gt;
&lt;li&gt;put text into box&lt;/li&gt;
&lt;li&gt;put progress indicator into box&lt;/li&gt;
&lt;li&gt;create mechanizm to be able to stop execution&lt;/li&gt;
&lt;li&gt;make some space for real program execution&lt;/li&gt;
&lt;li&gt;enable writing mode again&lt;/li&gt;
&lt;li&gt;put rotating sign always at the same place on the screen&lt;/li&gt;
&lt;li&gt;stop screen activity and return the cursor back to visible mode&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
If you start your code from putty, you should get result similar to the one above.&lt;br /&gt;
You will be able to observe rotating cursor for about five seconds. As you can see&lt;br /&gt;
there is not too much of code needed (only 42 lines). Give special attention to the&lt;br /&gt;
line with a &#39;&lt;b&gt;trap&lt;/b&gt;&#39; command. This one is needed to prevent our script getting&lt;br /&gt;
out of control. When you press ctrl+c or some other interrupt combination, &#39;trap&#39;&lt;br /&gt;
will also delete controlling file &#39;/tmp/.waiting&#39; and force subscript to stop.&lt;br /&gt;
&lt;br /&gt;
As you can see a lot of &#39;&lt;b&gt;q&lt;/b&gt;&#39; and some other characters are used. Those characters &lt;br /&gt;
will draw some lines inside &quot;drawing&quot; mode for you. To see other characters, switch &lt;br /&gt;
to drawing mode and try them out:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Only small case characters will draw something for you. &lt;br /&gt;
But if you press large case character it will just present itself as a normal character.&lt;br /&gt;
Since screen that looks like a garbage can cause a little panic with you. To be sure, that&lt;br /&gt;
you have everything under control, just type &#39;&lt;b&gt;reset&lt;/b&gt;&#39; and it will normalize screen for you again.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Characters shown above should be supported by most terminal emulators. But on some terminals&lt;br /&gt;
you will also be able to to get more &quot;drawing&quot; characters to your screen. This way you will also&lt;br /&gt;
make your program more terminal dependable. So just try to stick with characters shown above.&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;
Next two articles: &lt;/h5&gt;
Some fancy and usefull screensavers for system administrators.&lt;br /&gt;
&lt;br /&gt;
Creating fancy pure Bash selection tui-mode menu methods.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;&lt;b&gt;echo -en &quot;\033%@&quot;;echo -en &quot;\033(0&quot;&lt;/b&gt;
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;Q ─   W ┬   T ├   Z ≥ 

U ┤   A ▒   F °   G ±

J ┘   K ┐   L ┌   Y ≤

X │   V ┴   N ┼   M └
&lt;/pre&gt;
&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;#!/bin/bash
 CLEAR(){ echo -en &quot;\033c&quot;;}                            # Predefined functions
 CIVIS(){ echo -en &quot;\033[?25l&quot;;}                        # (see description above)
 CNORM(){ echo -en &quot;\033[?12l\033[?25h&quot;;}               #
  TPUT(){ echo -en &quot;\033[${1};${2}H&quot;;}                  #
  DRAW(){ echo -en &quot;\033%@&quot;;echo -en &quot;\033(0&quot;;}         #
 WRITE(){ echo -en &quot;\033(B&quot;;}                           #
  BLUE(){ echo -en &quot;\033c\033[0;1m\033[37;44m\033[J&quot;;}  #

   touch /tmp/.waiting                                  # create an empty control file
   trap &quot;rm -rf /tmp/.waiting;exit 2&quot; 1 2 3 15          # catch interrupt keys (like ctrl+c)

   P1(){ echo -n  &#39;|&#39;;}                                 # function P1 (for progress)
   P2(){ echo -n  &#39;/&#39;;}                                 #          P2
   P3(){ echo -n &#39;-&#39;;}                                  #          P3
   P4(){ echo  -n &#39;\&#39;;}                                 #          P4

   CLEAR                                                # clear screen
   BLUE                                                 # make background blue and font white
   CIVIS                                                # hide cursor

   echo -e &quot;&quot;                                           # empty line
   echo -e &quot;&quot;                                           # empty line again

   DRAW                                                 # switch to drawing mode
   echo -e &quot;  lqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqk&quot;         # draw box lines
   echo -e &quot;  x                              x&quot;         #
   echo -e &quot;  x EXECUTING IN PROGRES:        x&quot;         # use large case, since small ones
   echo -e &quot;  x                              x&quot;         # are now used used for drawings
   echo -e &quot;  mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj&quot;         #
   WRITE                                                # switch back to normal text input mode

   i=0                                                  # set variable &#39;i&#39;
   while [ -f /tmp/.waiting ]                           # while file exist
   do                                                   # 
    i=$((++$i))                                         # increase variable i by one each time
     TPUT 5 30 ;P$i                                     # put one of P1, P2, P3 or P4 to exact position

     if [ &quot;$i&quot; = &quot;4&quot; ]; then                            # make sure that variable &#39;i&#39; will never
        unset i                                         # increase over 4
     fi                                                 #

    usleep 100000                                       # 0.1 second sleep (microsleep)
   done &amp;amp;                                               # fork a subprocess and execute it in background

   # some operation here                                # customize for your needs (put some custom commands)

   sleep 5                                              # sleep for another 5 seconds
   rm -rf /tmp/.waiting                                 # remove control file and stop execution

   TPUT 10 10                                           # put cursor out of the box to another place
   echo &quot;&quot;                                              # make an empty line
   CNORM                                                # Normalize cursor view
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/1225457909369983852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2011/01/power-of-echo-command-bash-console.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/1225457909369983852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/1225457909369983852'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2011/01/power-of-echo-command-bash-console.html' title='The power of echo command: Bash console drawing methods and some usefull tput-like functions'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1180798125026232193.post-3642658874134843243</id><published>2011-01-03T10:58:00.002+01:00</published><updated>2023-07-01T14:54:35.688+02:00</updated><title type='text'>Creating fancy pure Bash tui-mode selection menu methods</title><content type='html'>&lt;style&gt;
   .code {background: #ffe; border: 1px solid #960; padding: 1em; overflow: auto; font-size=11px;}
    body {font-family:helvetica;font-size:12px;}
  
&lt;/style&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Are you bored of just text running over your terminal?&lt;br /&gt;
Bash, simple as it is, also enables you creating tui-mode menus!&lt;br /&gt;
When I tried to do that five or six years ago it was a real nightmare.&lt;br /&gt;
Well I am not promise you heaven, but I can promise you pretty much nice and usable selection menu.&lt;br /&gt;
It is not easy to build a menu under Bash, because it lacks a lot of functions that some advanced languages have.&lt;br /&gt;
In addition everybody will try to discourage you: &quot;Use ncurses or dialog - it is the only way&quot;.&lt;br /&gt;
Well if I look back, they were all correct - it is much faster, shorter, easier but I still wanted pure Bash!&lt;br /&gt;
Now you will ask: &quot;Why is that? It is easy just to use some library and create menus!&quot;&lt;br /&gt;
But I have at least two reasons for that:&lt;br /&gt;
&lt;br /&gt;
- I want my programs to be fancy but not depend on some external libraries&lt;br /&gt;
&lt;br /&gt;
- Sometimes it is hard to install or even compile all libraries you need, especially on some tiny Linux distributions&lt;br /&gt;
To be able to do some eye-candy programming under Bash, you will need to use some functions that almost look like a binary code.&lt;br /&gt;
There is nothing very complicated down there, you just be sure to type down all that code correctly.&lt;br /&gt;
If you are looking for detailed explanation on functions below, please see a Linux Journal article &lt;br /&gt;
&#39;&lt;i&gt;The power of echo command: Bash console drawing methods and some useful tput-like functions&lt;/i&gt;&#39;.&lt;br /&gt;
&lt;h5&gt;
Some &#39;strange&#39; functions&lt;/h5&gt;
Put functions below (or the ones you need) to the beginning of your bash script and you are ready to move forward.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;#!/bin/bash
e=&#39;echo -en&#39;                                     # shortened echo command variable
   ESC=$( $e &quot;\033&quot;)                             # variable containing escaped value 
 CLEAR(){ $e &quot;\033c&quot;;}                           # clear screen
 CIVIS(){ $e &quot;\033[?25l&quot;;}                       # hide cursor
 CNORM(){ $e &quot;\033[?12l\033[?25h&quot;;}              # show cursor
  TPUT(){ $e &quot;\033[${1};${2}H&quot;;}                 # terminal put (x and y position)
COLPUT(){ $e &quot;\033[${1}G&quot;;}                      # put text in the same line as the specified column
  MARK(){ $e &quot;\033[7m&quot;;}                         # select current line text
UNMARK(){ $e &quot;\033[27m&quot;;}                        # normalize current line text
  DRAW(){ $e &quot;\033%@&quot;;echo -en &quot;\033(0&quot;;}        # switch to &#39;garbage&#39; mode to be able to draw
 WRITE(){ $e &quot;\033(B&quot;;}                          # return to normal (reset)
  BLUE(){ $e &quot;\033c\033[0;1m\033[37;44m\033[J&quot;;} # clear screen, set background to blue and font to white
&lt;/pre&gt;
&lt;h5&gt;
The challenge&lt;/h5&gt;
Not to make things very complicated, I would like just a simple script that responds to arrow-keys.&lt;br /&gt;
But how to convince arrows to produce some actions at the Bash console?&lt;br /&gt;
Those are keys responsible for moving around the screen (mostly just back and forward).&lt;br /&gt;
So I created a simple experiment: if I just type &#39;read&#39; at the Bash command prompt and press &#39;enter&#39;, cursor will wait for me to enter some input.&lt;br /&gt;
If I type some letters, they will appear as normal characters.&lt;br /&gt;
But if I press one of the arrow-keys, I will get more than one character for each arrow-key pressed:&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;up:     ^[[A
down:   ^[[B
left:   ^[[D
right:  ^[[C
&lt;/pre&gt;
Things are not getting any easier when you find out that first two characters &#39;^[&#39; are actually a single character that represents ESCAPE.&lt;br /&gt;
How to intercept that?&lt;br /&gt;
&lt;h5&gt;
How to complicate simple things&lt;/h5&gt;
Until I did not know &#39;read&#39; command better I found on the Internet many articles that tried to get a single characters from pressed arrow-keys. &lt;br /&gt;
The most wild idea which turned into my humble experiment is using &#39;dd&#39; command instead of &#39;read&#39; which is able to intercept a single character if you define it correctly of course.&lt;br /&gt;
So my main problem as I found later was how to catch or display &#39;ESCAPE&#39; character.&lt;br /&gt;
Along with &#39;dd&#39; command you do not have to use &#39;read&#39; as well.&lt;br /&gt;
So on the Internet I&#39;ve got an idea, just to let all characters to try show up when certain key is pressed but intercept them as a stream.&lt;br /&gt;
Take a look below.&lt;br /&gt;
The price of universality is complexity.&lt;br /&gt;
Not acceptable for a beginner at all!&lt;br /&gt;
Also not too functional. &lt;br /&gt;
This was just crazy!&lt;br /&gt;
At least 23 lines to intercept a single key?&lt;br /&gt;
To make characters &#39;capturing&#39; and actions function properly, you also need to adjust stty - terminal line settings.&lt;br /&gt;
And this is different for different terminals on different operating systems!&lt;br /&gt;
You can try this script, but complexity in compare to result will just not impress you.&lt;br /&gt;
And it is slow!&lt;br /&gt;
It is even nicer if you run such script in a loop.&lt;br /&gt;
If you then press a down or up arrow-key, script will put all your continuous actions &lt;br /&gt;
into queue and it will run your menu as long as many key pressed actions were executed.&lt;br /&gt;
Not too usable you need to agree.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;#!/bin/bash
# constructed by oTo
# mentioned just to respond to one arrow-key (up or down) and exit
# and to work on different UNIX systems
ESC=$(echo -en &quot;\033&quot;)
                                 ####### for LINUX and AIX this is the same
                                 sttyvar=&quot;stty -echo  cbreak&quot;
if [ &quot;`uname`&quot; = &quot;HP-UX&quot; ]; then sttyvar=&quot;stty  echo -icanon&quot;; fi
if [ &quot;`uname`&quot; = &quot;SunOS&quot; ]; then sttyvar=&quot;stty -echo  icanon&quot;; fi

GetKey(){                                                               # type dd, wait for input and...
    first=`dd bs=1 count=1 2&amp;gt;/dev/null`; case &quot;$first&quot; in $ESC)         # intercept first character
   second=`dd bs=1 count=1 2&amp;gt;/dev/null`; case &quot;$second&quot; in &#39;[&#39;|&#39;0&#39;|&#39;O&#39;) # intercept second one (different for some consoles)
    third=`dd bs=1 count=1 2&amp;gt;/dev/null`; case &quot;$third&quot; in               # intercept the third character in a string
                        A|OA) first=UP;;                                # decision for up
                        B|OB) first=DN;;                                # decision for down arrow-keys
                          *) first=&quot;$first$second$third&quot;;; esac;;       # all the other combinations send to eternity ;)
                          *) first=&quot;$first$second&quot;;;
esac ;; esac; echo &quot;$first&quot;;}
ARROW(){ stty -echo cbreak;Key=`GetKey`
           case &quot;$Key&quot; in
               UP) echo &quot;UP&quot;;;                                          # on key up print UP
               DN) echo &quot;DN&quot;;;                                          # on key down print DN
                *) echo &quot;`echo \&quot;$Key\&quot; | dd  2&amp;gt;/dev/null`&quot;;;           # ignore the rest
           esac;}
cursor=$(ARROW)
reset                                                                   # screen reset is required or you will notice
     if [[ &quot;$cursor&quot; = &quot;UP&quot; ]]; then echo UP; fi                        # some confused behavior after script ends.
     if [[ &quot;$cursor&quot; = &quot;DN&quot; ]]; then echo DN; fi
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h5&gt;
Can you do it shorter?&lt;/h5&gt;
Yes I can! Here you have shortened version.&lt;br /&gt;
It will do the same but if you put it into a loop, you will not be able to get out. &lt;br /&gt;
Even a &#39;trap&#39; command will not save you!&lt;br /&gt;
You will also notice some strange behaviour this way. &lt;br /&gt;
After every loop-run, shell will add some aditional spaces in front of our predefined output.&lt;br /&gt;
So this one is not usable for our needs.&lt;br /&gt;
But you can play with it and perhaps construct a game that responds to cursor movements?&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;stty_state=`stty -g`
  stty raw
  stty -echo
  keycode=`dd bs=1 count=1 2&amp;gt;/dev/null`
  keycode=`dd bs=1 count=1 2&amp;gt;/dev/null`
  keycode=`dd bs=1 count=1 2&amp;gt;/dev/null`
  if [ &quot;$keycode&quot; = &quot;A&quot; ];then echo up;fi
  if [ &quot;$keycode&quot; = &quot;B&quot; ];then echo dn;fi

&lt;/pre&gt;
&lt;br /&gt;
&lt;h5&gt;
Simplified arrow-keys reader engine using advanced &#39;read&#39; options&lt;/h5&gt;
Command &#39;read&#39; which is Bash internal, also hides some goodies inside.&lt;br /&gt;
But I didn&#39;t know that at the beginning.&lt;br /&gt;
It &lt;br /&gt;
is not just able to read some value into some variable - it can also read-in certain amount of characters from input.&lt;br /&gt;
If -n is supplied it reads &#39;n&#39; characters from supplied input into variable and stops reading&lt;br /&gt;
If -s is specified, operation will be done quietly even if input comes from the terminal.&lt;br /&gt;
Those additional functionalities of &#39;read&#39; command can drastically simplify our script.&lt;br /&gt;
Especially if you know how to serve ESCAPE characters properly.&lt;br /&gt;
Yes &#39;&lt;u&gt;properly&lt;/u&gt;&#39;!. &lt;br /&gt;
As you can see below &#39;ESC&#39; is not a function but a variable that already contains an escaped value.&lt;br /&gt;
If &#39;ESC&#39; would be a function, it would start executing when program would already expect a value.&lt;br /&gt;
And you - as I was - would just observe strange behavior not knowing what is going wrong.&lt;br /&gt;
Below is simplified Bash script, that will display to you which arrow-key was pressed.&lt;br /&gt;
Simplicity also has some drawbacks.&lt;br /&gt;
Command &#39;read&#39; can respond slow and you will produce some garbage on the screen.&lt;br /&gt;
It might also not respond on other terminals or UNIX system the way you will expect.&lt;br /&gt;
Script as simple as it is, enables you to continuously press arrow-keys and get an info on each pressed key.&lt;br /&gt;
Well, anyway we have some progress now don&#39;t we? In only 9 lines!&lt;br /&gt;
But this is just a beginning.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;#!/bin/bash
ESC=$(echo -en &quot;\033&quot;)                     # define ESC
while :;do                                 # infinite loop
read -s -n3 key 2&amp;gt;/dev/null &amp;gt;&amp;amp;2            # read quietly three characters of served input
  if [ &quot;$key&quot; = &quot;$ESC[A&quot; ];then echo up;fi # if A is the result, print up
  if [ &quot;$key&quot; = &quot;$ESC[B&quot; ];then echo dn;fi #    B                      dn
  if [ &quot;$key&quot; = &quot;$ESC[C&quot; ];then echo ri;fi #    C                      ri
  if [ &quot;$key&quot; = &quot;$ESC[D&quot; ];then echo le;fi #    D                      le
done
&lt;/pre&gt;
&lt;h5&gt;
What&#39;s next? &lt;/h5&gt;
We can handle our cursor/arrow-keys now but where is the menu?&lt;br /&gt;
Well here it is.&lt;br /&gt;
Yes I know, it looks more like an ugly tree than a fancy program.&lt;br /&gt;
It contains no real programming clarity.&lt;br /&gt;
The only thing that makes it worth trying is 55 lines.&lt;br /&gt;
I just did not have a heart to serve you with a hundred lines or more and take away from you all enthusiasm before you even start.&lt;br /&gt;
So program is optimized to smallest lines number not to greater readability.&lt;br /&gt;
This way perhaps you will try to make some improvements.&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;#/bin/bash
       E=&#39;echo -e&#39;;e=&#39;echo -en&#39;;trap &quot;R;exit&quot; 2
     ESC=$( $e &quot;\033&quot;)
    TPUT(){ $e &quot;\033[${1};${2}H&quot;;}
   CLEAR(){ $e &quot;\033c&quot;;}
   CIVIS(){ $e &quot;\033[?25l&quot;;}
    DRAW(){ $e &quot;\033%@\033(0&quot;;}
   WRITE(){ $e &quot;\033(B&quot;;}
    MARK(){ $e &quot;\033[7m&quot;;}
  UNMARK(){ $e &quot;\033[27m&quot;;}
    BLUE(){ $e &quot;\033c\033[H\033[J\033[37;44m\033[J&quot;;};BLUE
       C(){ CLEAR;BLUE;}
    HEAD(){ MARK;TPUT 1 4
            $E &quot;BASH SELECTION MENU                       &quot;;UNMARK
            DRAW
            for each in $(seq 1 9);do
             $E &quot;   x                                        x&quot;
            done;WRITE;}
            i=0; CLEAR; CIVIS;NULL=/dev/null
    FOOT(){ MARK;TPUT 11 4
            printf &quot;ENTER=SELECT, UP/DN=NEXT OPTION           &quot;;UNMARK;}
   ARROW(){ read -s -n3 key 2&amp;gt;/dev/null &amp;gt;&amp;amp;2
            if [[ $key = $ESC[A ]];then echo up;fi
            if [[ $key = $ESC[B ]];then echo dn;fi;}
POSITION(){ if [[ $cur = up ]];then ((i--));fi
            if [[ $cur = dn ]];then ((i++));fi
            if [[ i -lt 0   ]];then i=$LM;fi
            if [[ i -gt $LM ]];then i=0;fi;}
 REFRESH(){ after=$((i+1)); before=$((i-1))
            if [[ $before -lt 0  ]];then before=$LM;fi
            if [[ $after -gt $LM ]];then after=0;fi
            if [[ $j -lt $i      ]];then UNMARK;M$before;else UNMARK;M$after;fi
            if [[ $after -eq 0   ]] || [[ $before -eq $LM ]];then
            UNMARK; M$before; M$after;fi;j=$i;UNMARK;M$before;M$after;}
      M0(){ TPUT 3 20; $e &quot;Option0&quot;;}
      M1(){ TPUT 4 20; $e &quot;Option1&quot;;}
      M2(){ TPUT 5 20; $e &quot;Option2&quot;;}
      M3(){ TPUT 6 20; $e &quot;Option3&quot;;}
      M4(){ TPUT 7 20; $e &quot;Option4&quot;;}
      M5(){ TPUT 8 20; $e &quot;ABOUT  &quot;;}
      M6(){ TPUT 9 20; $e &quot;EXIT   &quot;;}
     LM=6    #Last Menu number
    MENU(){ for each in $(seq 0 $LM);do M${each};done;}
    INIT(){ BLUE;HEAD;FOOT;MENU;}
      SC(){ REFRESH;MARK;$S;cur=`ARROW`;}
      ES(){ MARK;$e &quot;\nENTER = main menu &quot;;$b;read;INIT;};INIT
while [[ &quot;$O&quot; != &quot; &quot; ]]; do case $i in
      0) S=M0;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o0:\n$(w        )\n&quot;;ES;fi;;
      1) S=M1;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o1:\n$(ifconfig )\n&quot;;ES;fi;;
      2) S=M2;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o2:\n$(df -h    )\n&quot;;ES;fi;;
      3) S=M3;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o3:\n$(route -n )\n&quot;;ES;fi;;
      4) S=M4;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o4:\n$(date     )\n&quot;;ES;fi;;
      5) S=M5;SC;if [[ $cur = &quot;&quot; ]];then C;$e &quot;o5:\n$($e by oTo)\n&quot;;ES;fi;;
      6) S=M6;SC;if [[ $cur = &quot;&quot; ]];then C;exit 0;fi;;
esac;POSITION;done
&lt;/pre&gt;
Let me also explain some crucial sections/function that I&#39;ve used.&lt;br /&gt;
&lt;h5&gt;
Function HEAD&lt;/h5&gt;
To have at least some minimal frame around your menu, custom function HEAD will draw a header and side lines. &lt;br /&gt;
It will not give you an exact frame, because it will took me a few more lines of &quot;empty coding&quot;.&lt;br /&gt;
You will get left and right border. As you already noticed some commands are separated with too much spaces.&lt;br /&gt;
Those spaces are responsible for your program layout. &lt;br /&gt;
So adjust them the way you like.&lt;br /&gt;
&lt;h5&gt;
Function FOOT&lt;/h5&gt;
To have frame closed, we need to add also something at the bottom.&lt;br /&gt;
There should be short usage description as you can see it from a picture below.&lt;br /&gt;
In both cases MARK and UNMARK custom functions are used to reverse background and foreground colors.&lt;br /&gt;
So you do not need too much &#39;drawing&#39;.&lt;br /&gt;
&lt;h5&gt;
Function POSITION&lt;/h5&gt;
This function locates and manages menu selection positions.&lt;br /&gt;
Without this one you will get an error when cursor keys will be pressed too many times.&lt;br /&gt;
Instead of that, this function gives you a nice rotating effect. &lt;br /&gt;
When you come to the end of menus you can press down arrow-key one more time and you will be returned to the start.&lt;br /&gt;
The same applies if you go from another direction.&lt;br /&gt;
&lt;h5&gt;
Function REFRESH&lt;/h5&gt;
To prevent too much refreshing, I constructed a simple hack that will refresh only menus at the neighbors positions.&lt;br /&gt;
Without that full screen might need to be refreshed for each your action. What it actually does is the following:&lt;br /&gt;
for every pressed up or down arrow-key, it &#39;repaints&#39; menu options this way: sets normal layout for options in front&lt;br /&gt;
and after selected option, paints selected option with the inverted color scheme.&lt;br /&gt;
&lt;h5&gt;
&#39;while&#39; loop&lt;/h5&gt;
At the end of script, you will find numbered lines, where can you put your commands or even functions.&lt;br /&gt;
If you will use custom functions, they need to be defined at the start of this script.&lt;br /&gt;
Or you can also call them from another file this way (also at the beginning of menu script):&lt;br /&gt;
&lt;pre class=&quot;code&quot;&gt;. /path/to/functions-file
&lt;/pre&gt;
&#39;Dot&#39; should be separated from &#39;slash&#39;. This way you will call all custom settings into current environment.&lt;br /&gt;
What you can expect if you typed all lines as you should is something similar to the picture below.&lt;br /&gt;
You will not see border around your program as presented on the picture, you will see border disappear under header and footer.&lt;br /&gt;
So I challenge you to try to create the exact look as you can see below.&lt;br /&gt;
&lt;table style=&quot;background: blue; border: 0px currentColor; color: #dddddd; width: 400px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&lt;br /&gt;
&lt;table style=&quot;font-family: courier; width: 300px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;background: rgb(238, 238, 238); color: blue;&quot;&gt;BASH SELECTION MENU&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td align=&quot;center&quot;&gt;&lt;br /&gt;
&lt;table style=&quot;background: blue; border: 1px currentColor; color: #dddddd; font-family: courier; width: 100px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;background: rgb(238, 238, 238); color: blue;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
Option0&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
Option1&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
Option2&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
Option3&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
Option4&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
ABOUT&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;center&gt;
EXIT&lt;/center&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;background: rgb(238, 238, 238); color: blue;&quot;&gt;ENTER=SELECT, UP/DN=NEXT OPTION&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;h5&gt;
How to expand it?&lt;/h5&gt;
If you need to add more menu options or perhaps take some of them away, you need to adjust some variables.&lt;br /&gt;
This is not nice I admit but it is doable.&lt;br /&gt;
First you need to find lines that start with M0, M1, ...&lt;br /&gt;
Those lines describe menu values. &lt;br /&gt;
Add a line here, increase a &#39;TPUT&#39; line number, and enter custom description.&lt;br /&gt;
Adjust &#39;LM&#39; variable, which is just a number of all menus.&lt;br /&gt;
Under &#39;while&#39; loop add an aditional line nad adjust starting number &#39;0-5)&#39; and &#39;M0-5&#39; number.&lt;br /&gt;
If you will add too much options, you will also need to adjust &#39;HEAD&#39; and &#39;FOOT&#39; options for &#39;TPUT&#39;.&lt;br /&gt;
And this is it.&lt;br /&gt;
&lt;h5&gt;
Conclusion&lt;/h5&gt;
I do not expect you to say: &quot;What a great script!&quot;&lt;br /&gt;
I am expecting you to improve it, make it even shorter and faster and more usable.&lt;br /&gt;
Perhaps you can try with arrays?&lt;br /&gt;
Surprise me and surprise yourself.&lt;br /&gt;
If you will have troubles, try to use complicated &#39;dd&#39; engine, which will assure you to be multi-system compatible. &lt;br /&gt;
But I sincerely hope you will survive with the simple version.</content><link rel='replies' type='application/atom+xml' href='http://top-scripts.blogspot.com/feeds/3642658874134843243/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://top-scripts.blogspot.com/2011/01/blog-post.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/3642658874134843243'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1180798125026232193/posts/default/3642658874134843243'/><link rel='alternate' type='text/html' href='http://top-scripts.blogspot.com/2011/01/blog-post.html' title='Creating fancy pure Bash tui-mode selection menu methods'/><author><name>top-scripts</name><uri>http://www.blogger.com/profile/14414323776362812909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry></feed>