close
*null 唯一空集合
*標準輸入指令---cat (concatenate files)
 cat 後面的參數可以為多個檔案,也可把多個檔案合成一個檔
 ls後面的參數,則只能顯示一個
*標準輸入、輸出、與錯誤訊息Standard Input, Output, And Error
*重新導向標準輸出Redirecting Standard Output
 大於符號 ">" 為其運算元。
 標準輸出0,標準輸入1,標準錯誤2
*  > 重新導向運算元---使用檔案
   | 管線運算元---前項命令的輸出做為次項命令的輸入
*箭頭:將結果送給檔案
*Pipeline:面對command,將資料傳輸出去
*Sort 排序---將資料按字母排序
*Uniq很少單獨出現,通常會和sort一起出現,也就是將重複的資料刪除,
 會顯示有多少的重複
*Grep就是捉取符合語法的資料,
 例如:捉取zip這三個字的檔案會通通顯示出來
 
第六章 Redirection
1. cat→Concatenate files
  連接檔案
  1.png
2. sort→Sort lines of text
   排序文字檔列
3. uniq→Report or omit repeated lines
   顯示或省略重複行
4. grep→Print lines matching a pattern
   印出符合列
5. wc→Print newline, word, and byte counts for each file
   列印檔案中分行符號,字,和位元組個數

   2.png

   3.png

6. head→Output the first part of a file
   輸出文件第一部分
7. tail→Output the last part of a file
   輸出文件最後一部分
   4.png 
8. tee→Read from standard input and write to standard output and files
   從Stdin讀取資料,並同時輸出到Stdout和檔案
   5.png
 

6.png

指令類型

7.png    8.png

紅標---可執行程式、藍標---shell自身的命令、黃標---命名別稱
arrow
arrow
    全站熱搜

    wendy1251103 發表在 痞客邦 留言(0) 人氣()