LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Using Curses in shell scripts (https://www.linuxquestions.org/questions/programming-9/using-curses-in-shell-scripts-261694/)

subu_s 12-02-2004 07:09 AM

Using Curses in shell scripts
 
Hi friends,
I need to write an shell script that has to print characters at certain locations on the screen. say print ("Hi",2,10)
should print "Hi" in row 2 and column 10 in my shell.

Any shell curses libraries available? or can I do it somehow without including any external library?

Regds,

perfect_circle 12-02-2004 08:11 AM

Quote:

When not to use shell scripts
resource−intensive tasks, especially where speed is a factor (sorting, hashing, etc.)
procedures involving heavy−duty math operations, especially floating point arithmetic, arbitrary
precision calculations, or complex numbers (use C++ or FORTRAN instead)
cross−platform portability required (use C instead)
complex applications, where structured programming is a necessity (need typechecking of variables,
function prototypes, etc.)
mission−critical applications upon which you are betting the ranch, or the future of the company ·
situations where security is important, where you need to guarantee the integrity of your system and
protect against intrusion, cracking, and vandalism
project consists of subcomponents with interlocking dependencies
extensive file operations required (Bash is limited to serial file access, and that only in a particularly
clumsy and inefficient line−by−line fashion)
need multi−dimensional arrays
need data structures, such as linked lists or trees
need to generate or manipulate graphics or GUIs
need direct access to system hardware
need port or socket I/O
need to use libraries or interface with legacy code
proprietary, closed−source applications (shell scripts are necessarily Open Source)
I can't say an absolute NO, but i've never seen something like that.

you can use "clear" to clear the screen and use tabs (\t) and new lines (\n) and programs like "banner" to give a nice output. You may also combine your scripts with high-level programming languages programs, but if a nice interface is your priority you probably shouldn't use bash.

...Just my opinion:(

AnanthaP 12-02-2004 09:21 AM

tput cup 2 10; echo -n "Hi"

End

subu_s 12-02-2004 09:24 AM

Thanks a lot Anitha. It works cool


All times are GMT -5. The time now is 08:01 AM.