Web lists-archives.com

Re: [Mingw-msys] [mingw - MSYS] Bison for MSYS




刘昊 a écrit :
> Hi, folks,
> 
> I've been writing a shell script, display my source code first, then 
> prompt user to build from the source. I want the screen to be cleared 
> after showing the code, but I can not do that in a shell script written 
> under MSYS. Here is my script:
> 
> #!/bin/sh
> 
> vim sourcecode.cpp
> 
> clear
> 
> Do you want to build from source?[Y/N]:
> 
> read answer
> 
> …
> 
> …
> 
> Anyone here had the similar situation before? Any replies will be 
> appreciated, thank you.
> 
> Best regards,
> 
> Hao Liu
> 


The usual method with terminals is:
echo -ne "\033[2J\033[H"

Note it is not guaranteed to be portable.

It worked for me under msys.

Michael


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mingw-msys mailing list
Mingw-msys@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/mingw-msys