Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-02-2004, 07:09 AM   #1
Registered: Jun 2004
Posts: 36

Rep: Reputation: 15
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?

Old 12-02-2004, 08:11 AM   #2
Senior Member
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
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

Last edited by perfect_circle; 12-02-2004 at 08:14 AM.
Old 12-02-2004, 09:21 AM   #3
Registered: Jul 2004
Location: Chennai, India
Distribution: UBUNTU 5.10 since Jul-18,2006 on Intel 820 DC
Posts: 843

Rep: Reputation: 201Reputation: 201Reputation: 201
tput cup 2 10; echo -n "Hi"

Old 12-02-2004, 09:24 AM   #4
Registered: Jun 2004
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks a lot Anitha. It works cool


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with shell scripts thorney Linux - Newbie 4 11-27-2005 11:18 PM
shell scripts newbie_m Linux - Newbie 3 01-18-2005 08:12 PM
Shell scripts??? F_ANTHONY Programming 2 10-27-2004 06:28 PM
Shell Scripts benwy Linux - Software 1 06-09-2003 02:58 AM
Shell scripts j0hn0n1 Linux - Software 1 01-03-2003 03:11 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration