Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-11-2011, 04:00 AM   #16
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
LQ Newbie
Registered: Sep 2011
Posts: 9

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

Rep: Reputation: 239Reputation: 239Reputation: 239
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:
.bashrc info:

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


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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:58 AM.

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
Open Source Consulting | Domain Registration