LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-25-2006, 05:27 AM   #1
c19h28O2
LQ Newbie
 
Registered: Apr 2006
Location: London
Posts: 29

Rep: Reputation: 15
Korn Shell PS1


Hi,

I would like my prompt to have my PWD but with the commands entered on a new line so...

/userhome/someuser
$ ls

the PWD i have got working but can only get

/userhome/someuser $

Is it possible to have a newline command in the PS1 variable?

Thanks

C19
 
Old 04-25-2006, 06:05 AM   #2
mjjzf
Member
 
Registered: Feb 2004
Location: Valby, Denmark / Citizen of the Web
Distribution: Slackware 14.1
Posts: 879

Rep: Reputation: 39
In your .bashrc, simply insert
PS1='\w \n \$ '

/edit > I now see you were referring to ksh. The BASH newline is \n - I am not sure how it goes in Korn.

Last edited by mjjzf; 04-25-2006 at 06:08 AM.
 
Old 04-25-2006, 06:09 AM   #3
c19h28O2
LQ Newbie
 
Registered: Apr 2006
Location: London
Posts: 29

Original Poster
Rep: Reputation: 15
Hi,

Thanks for the reply however I'm using ksh which doesn't except bash ps1 commands.

If I use the i get w n $ in the command line...

Thanks

C19
 
Old 04-25-2006, 06:23 AM   #4
mjjzf
Member
 
Registered: Feb 2004
Location: Valby, Denmark / Citizen of the Web
Distribution: Slackware 14.1
Posts: 879

Rep: Reputation: 39
Look at this one > http://arkiv.netbsd.se/?ml=netbsd-us...6-01&t=1703552

Last edited by mjjzf; 04-25-2006 at 06:25 AM.
 
Old 04-25-2006, 06:56 AM   #5
c19h28O2
LQ Newbie
 
Registered: Apr 2006
Location: London
Posts: 29

Original Poster
Rep: Reputation: 15
Hmmmmm i'm at work and cannot reach that site!
 
  


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
Korn shell and Arrays jpc82 Programming 1 06-28-2005 02:27 AM
Arrays in Korn Shell...? vous Programming 1 03-26-2005 01:35 AM
Using a Korn shell in rc scripts desbyleo Solaris / OpenSolaris 3 11-12-2004 05:27 PM
Korn shell script Muzica Solaris / OpenSolaris 4 09-06-2004 12:47 PM
install korn shell namgor Linux - Newbie 1 07-12-2004 02:52 PM


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