LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-11-2011, 04:00 AM   #16
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled

You don't use a C program just to change your prompt. You're overcomplicating. Edit: Also, presumably, system() creates a new process (though I'm not sure about this). It'd be weird, in the code for a shell to use system() to change the prompt; surely you'd have some code that changes it and displays a new prompt..

Last edited by Nylex; 09-11-2011 at 04:11 AM.
 
Old 09-11-2011, 04:27 AM   #17
parmishr
LQ Newbie
 
Registered: Sep 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
ok thanks a lot
 
Old 09-11-2011, 05:54 AM   #18
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: LinuxMint
Posts: 775

Rep: Reputation: 199Reputation: 199
You can set up your own aliases (ie make myls be for ls and similar) and you can set the prompt by changing the PS1 variable all within .bashrc. Why would you want to program something that is already done for you?

Bash prompt: http://tldp.org/HOWTO/pdf/Bash-Prompt-HOWTO.pdf
.bashrc info: http://tldp.org/LDP/abs/html/sample-bashrc.html

Last edited by jkirchner; 09-11-2011 at 05:55 AM.
 
  


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
user defined input in shell script ovaisalam Linux - Newbie 4 12-08-2010 06:44 AM
Create user-defined chains of accounting rules spoonpower Linux - Security 1 02-05-2007 08:19 AM
user defined shell commands ashley_31 Linux - Software 11 05-15-2006 03:27 AM
How to launch a program as a defined user at startup. Linux.tar.gz Linux - Software 2 03-20-2005 11:28 AM


All times are GMT -5. The time now is 08:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration