xclip ที่ไม่ใช่คลิปโป๊

ปกติผมมักจะเปิด Terminal เรียกคำสั่ง แล้ว Copy ผลลัพธ์ไปแปะในโปรแกรมอื่น เช่น Browser
แต่รู้สึกชีวิตมันลำบากเหลือเกิน เลยไปค้นเจอโปรแกรม xclip เป็นโปรแกรมจัดการ Clipboard (ที่พักข้อมูลเวลาเรา Copy/Paste) บน Linux

วิธีใช้

cat file.txt | xclip        # เอาผลลัพธ์ของคำสั่ง cat file.txt ไปใส่ใน clipboard

กด Paste ที่โปรแกรมที่ต้องการได้ทันที

คำสั่งอื่นๆ

xclip -o      # พิมพ์ข้อมูลที่มีอยู่ใน clipboard ออกมา
xclip -o > out.txt    # เอาเนื้อหาใน clipboard ลงไฟล์ out.txt

ติดตั้งด้วยคำสั่ง: sudo apt-get install xclip ตามปกติครับ

ใส่ความเห็น

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out /  เปลี่ยนแปลง )

Connecting to %s