LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 12-02-2004, 08:09 AM   #1
subu_s
Member
 
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?

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

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

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

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

End
 
Old 12-02-2004, 10:24 AM   #4
subu_s
Member
 
Registered: Jun 2004
Posts: 36

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


Reply


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-28-2005 12:18 AM
shell scripts newbie_m Linux - Newbie 3 01-18-2005 09:12 PM
Shell scripts??? F_ANTHONY Programming 2 10-27-2004 07:28 PM
Shell Scripts benwy Linux - Software 1 06-09-2003 03:58 AM
Shell scripts j0hn0n1 Linux - Software 1 01-03-2003 04:11 PM


All times are GMT -5. The time now is 10:48 AM.

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