Backbox Linux
  • Backbox Indonesia
  • Get's Started
    • System Requirements
    • Download Images
    • Installation
    • 5 Things To Do Right After Installing BackBox
  • Basic Linux
    • Mengenal GNU/Linux
    • Kenapa Linux?
    • Linux Desktop vs Linux Server
    • Distro Linux
    • Struktur Direktori GNU/Linux
    • Linux File System
  • Basic Command
    • Introduction
      • Terminal
      • Accessing Linux
      • Network Command
      • Important to remember of Linux
      • Change Password
    • Fundamental
      • File System Navigation Commands
      • TAB Completion and Up Arrow
      • Linux Types File
      • Linux Command Syntax
      • Help Commands
      • Creating Files & Directories
      • Files and Directories Permission
      • Files Ownership
      • Access Control List
      • Soft and Hard Links
      • Find Files and Directories
      • Files Maintenance
      • Wildcards
      • File Display Commands
      • Adding Text to Files
      • Pipeline (|)
      • Standard Output to a File (tee)
      • Filters / Text Processors Commands
      • Compare Files
      • Compress and Uncompress File
      • Truncate File Size
      • Combining and Splitting Files
      • Linux vs Windows Commands
    • System Administration
      • Linux File Editor (vi)
      • sed - Command
      • User Account Management
      • Switch Users and Sudo Access
      • Monitor Users
      • Talking to Users
      • System Utility Commands
      • Process and Jobs
      • Addtional cronjobs
      • Process Management
      • System Monitoring Commands
      • System Logs Monitor
      • System Maintenance Commands
      • Changing System Hostname
      • Finding System Information
      • Finding System Architecture
      • Terminal Commands
      • Terminal Control Keys
      • Recover Root Password
      • SOS Report
  • Bash Scripting
    • Environment Variables
    • Apa itu Shell?
    • Basic Shell Scripting
    • Input/Output
    • Percabangan (If)
    • Perulangan (For)
    • Perulangan (While)
    • Percabangan (Case)
    • Fungsi
    • Alias
    • Shell History
  • Networking
    • Untitled
  • Disk Management
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Basic Command
  2. Fundamental

Standard Output to a File (tee)

PreviousPipeline (|)NextFilters / Text Processors Commands

Last updated 4 years ago

Was this helpful?

Perintah tee digunakan untuk menampilkan dan menyimpan output ke dalam suatu file dari perintah sebelumnya (|).

tee - Command

echo "BroBro" # hanya menampilkan teks
echo "BroBro" > File # hanya menyimpan teks
echo "BroBro" | tee FILE # menampilkan dan menyimpan output kedalam file
echo "BroBro" | tee -a FILE # menambahkan hasil output dibaris terakhir file
wc -l FILE1 | tee -a FILE2 # menampilkan dan menyimpan hasil output perintah pertama ke dalam FILE2

Contoh lain yang bisa dilakukan adalah menambahkan teks ke dalam file secara interaktif menggunakan perintah tee.

Untuk memperdalami perintah tee, Anda bisa membaca .

artikel ini
Source: geeksforgeeks.org