LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 04-13-2006, 02:38 PM   #1
vito_huang
Member
 
Registered: Oct 2004
Posts: 68

Rep: Reputation: 15
how to write command line program?


just wondering how those great command line programs are made such as links, vim , top etc.i mean how to they wrote those interface.
i know we can write GUI programs using gtk or qt. but when is comes to making command line programs how is the interface made ( for example mc, how is those split screens, using keyboard to select things etc are impliment), is there any equivalent gtk or qt for making command line interface?

can someone give me some direction on how to write command interface programs?

thanks
 
Old 04-13-2006, 02:46 PM   #2
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Sid, Linux Mint DE
Posts: 4,236

Rep: Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545Reputation: 545
I think what you need is ncurses. Vi etc. might have been written with their own screen handling routines, not sure about that. But programs like fcdisk, mc and lynx use ncurses for sure.

There is plenty of documentation and demos included with the package, and various websites offer an on-line function reference. I just do not have the links at hand, but it is easy to find when you google.

jlinkels
 
Old 04-13-2006, 10:21 PM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
To get started, from the command line enter "man bash".
This will tell you about the bash shell, which is where most of it starts.

If you want to learn shell scripting, you also need to learn about sed, awk, grep, cut, cat, and an assortment of other commands that let you manipulate strings.
 
Old 04-14-2006, 01:20 AM   #4
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 12.04
Posts: 913

Rep: Reputation: 33
Quote:
Originally Posted by jlinkels
I think what you need is ncurses. Vi etc. might have been written with their own screen handling routines, not sure about that. But programs like fcdisk, mc and lynx use ncurses for sure.

There is plenty of documentation and demos included with the package, and various websites offer an on-line function reference. I just do not have the links at hand, but it is easy to find when you google.
I agree. FYI, ncurses is a console-based, "pseudo" GUI library. More on ncurses here.

http://invisible-island.net/ncurses/ncurses-intro.html
 
  


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
How write new MBR using command line only lonecrow Linux - Newbie 2 11-02-2005 11:17 AM
How to register a program for command line?? wepakis Linux - Software 8 11-13-2004 03:07 AM
Can somebody like share me to write files to DVD disc in command line? exper Linux - Software 3 08-11-2004 08:58 PM
Write to MBR while in the command line? EThitop Linux - Newbie 10 05-12-2004 12:04 AM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 09:19 AM


All times are GMT -5. The time now is 09:53 PM.

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