LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 01: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, 01:46 PM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
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, 09:21 PM   #3
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
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, 12:20 AM   #4
daihard
Member
 
Registered: Jul 2003
Location: Seattle, WA
Distribution: Kubuntu 14.04 LTS
Posts: 915

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:36 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
Open Source Consulting | Domain Registration