পুটিটিওয়াই চালানোর সময় কনসোল স্ক্রিন এবং স্ক্রলব্যাক বাফার সাফ করার জন্য, এটি আমার জন্য কাজ করে:
echo -en "\ec\e[3J"
এটি আসলে 2 টি "এসসি" সিকোয়েন্স যা স্বতন্ত্রভাবে কাজ করে ... সেগুলি উভয় ক্রমে ব্যবহার করা যেতে পারে:
# clears the console screen, but not the scrollback buffer
# this is actually the escape code to "reset" the terminal
echo -en "\ec"
# clears the scrollback buffer, but not the console screen
# screen content remains, and cursor position remains at its last position
echo -en "\e[3J"
echo -en "\ec"টার্মিনালটি পুনরায় সেট করে যা আপনার অন্যান্য টার্মিনাল সেটিংস পরিবর্তন করতে পারে। "রিসেট" এর পরিবর্তে আপনি এটি করতে পারেন:
# position the cursor to "Home" (Top Row, First Column)
echo -en "\e[H"
# Erase down: clear the screen from the cursor down to the bottom of the screen.
echo -en "\e[J"
# Note: this is supposed to clear the screen and position the cursor to home,
# but it didn't work like that for me. It cleared the entire screen (above and
# below the cursor), but left the cursor at its last position.
echo -en "\e[2J"
# putting everything together
echo -en "\e[H\e[J\e[3J"
আপনি এটি একটি শেল স্ক্রিপ্টে রাখতে পারেন এবং এটি ঠিক কাজ করে।
কিছু সিস্টেম নির্ভরতা রয়েছে:
আমি পিটিটিওয়াই সংযোগ ব্যবস্থাপক (সংস্করণ 0.7.1 বিটা (বিল্ড 136)) ব্যবহার করছি, পুটিটি (0.60 প্রকাশ করুন) সহ।
টাইপিং:
echo \"$TERM\"; /bin/sh --version
রিপোর্ট:
"xterm"
GNU bash, version 4.1.2(1)-release-(x86_64-redhat-linux-gnu) ...