I need to print out text from a file in the console up, you know someone like that?
'Someone' like who?
Could you elaborate what you're after (hopefully with examples)?
as in, make the console go backwards?
This can vary depending on your terminal since it's not a standard feature, but the escape sequence "ESC M" moves the terminal up one line in at least some.
Try this. It reads lines from /etc/passwd ( you can use anything you want ), adds two ESC-M sequences, then prints the lines one by one. Scrolls up handily on this system.
sed 's/$/\x1bM\x1bM/' < /etc/passwd | while IFS="" read LINE
do
sleep 1
echo "$LINE"
done
I need to print out text from a file in the console up
Is this homework?
yes...I need to print out text from a file in the console up
Post in the homework forum, following the homework rules please.
I need to print out text from a file in the console up...not all tasks ... This is here just for show
Please follow the rules of the forums you agreed to when you registered.
Repost in the 'homework' forums following the required submission template.
Thank you.