Sponsored Content
Full Discussion: Prompt path display issue
Top Forums UNIX for Dummies Questions & Answers Prompt path display issue Post 302921664 by aelhosiny on Sunday 19th of October 2014 07:52:31 AM
Old 10-19-2014
Sorry,
I did not mention that I'm using csh as default shell on centos 5.10
It's the default shell set by the sys admin

Accordingly the PS1 does not exist Smilie
I have already added these commands to my .cshrc

---------- Post updated at 01:52 PM ---------- Previous update was at 01:42 PM ----------

Quote:
Originally Posted by RavinderSingh13
Hello aelhosiny,

Not sure completely about your requirement, but if you want to change prompt string then you can use PS1 command as follows.

Code:
[singh@localhost awk_programming]$ 
[singh@localhost awk_programming]$ PS1="TEST $"
TEST $man test

Similarly you can put any pwd according to your need in it. Also if you want to permanently fix prompt string you can add this command in the .profile of user.

Thanks,
R. Singh

What I need the command prompt to display the full path and $USER@HOST each in a separate line instead of both displayed in the same line so that I will have:

Code:
<The exact long path>
<my username> @ <hotsname> $

As you see, the path is not in the same line with the username and host.

Last edited by rbatte1; 10-20-2014 at 09:53 AM.. Reason: Changed ICODE tags to just CODE tags
 

10 More Discussions You Might Find Interesting

1. Solaris

no boot prompt display

just put blank harddisk in my ultra10. i see no display to show me the boot> prompt. i don't know what happened....?? Got a third party graphic card. Display was ok. Monitor seems to be ok. i used different one with same result. (1 Reply)
Discussion started by: S26+
1 Replies

2. UNIX for Dummies Questions & Answers

Path in prompt line?

Can anyone tell me what makes the current path appear in the prompt ? thx (4 Replies)
Discussion started by: Leitwolf
4 Replies

3. Solaris

Solaris 10 install doesn't display Network Connectivity prompt page

I have two Dell x86 machines on which I am attempting to install Solaris 10 from CD. I am not doing a Jumpstart install. This is my first experience in installing Solaris (or any other OS). I am following the instructions at How to Quickly Install the Solaris 10 1/06 OS The first machine... (3 Replies)
Discussion started by: sarahsi
3 Replies

4. Solaris

How to display hostname in command prompt

Anyone know How to configure solaris 8 to display hostname in command prompt , everytime when you open a terminal screen . (3 Replies)
Discussion started by: civic2005
3 Replies

5. Shell Programming and Scripting

How to change prompt color when changing path

Hi all, Can you tell me how to change the prompt color (only the path part) when I chnange directory with "cd"? I use the sequence below in ".bashrc" (Solaris 8) to change my prompt colors and I'd like to modify it to change the path color when I cange directory. PSC() { echo -ne "\"; }... (0 Replies)
Discussion started by: majormark
0 Replies

6. UNIX for Advanced & Expert Users

Help-prompt for path and take this as input in find command

HI , I am trying to wite a script that will prompt me saying " what is path that you want to find ?". once i specify the path, the script should put this path in the find command mentioned below and execute the script: find <path> -ctime +200 -type f -exec ls -l {} \; for example : ... (7 Replies)
Discussion started by: bsandeep_80
7 Replies

7. Shell Programming and Scripting

how to change unix cmd display prompt?

I am new to to unix and I want to make my own basic shell. What is the code I can use to change the unix cmd console display? For example my unix display prompt says MyCompterName~, I want it to say WhatEverMan~ (3 Replies)
Discussion started by: megaearth77
3 Replies

8. Shell Programming and Scripting

How to display current time in the prompt

Hello All, I would like to display the current time in prompt. I tried using following command: export PS1="$(date +%k:%M:%S) $ " but it gave me a fixed time in prompt whereas my objective is to get the current time everytime. $ export PS1="$(date +%k:%M:%S) $ " 17:42:42 $ 17:42:42 $... (32 Replies)
Discussion started by: manishdivs
32 Replies

9. UNIX for Dummies Questions & Answers

Display the absolute path...

I don't understand the question below..any can help me? thanks Display the absolute path of the executable used when a 'grep' command is entered on the command line: ---------- Post updated at 08:30 PM ---------- Previous update was at 08:29 PM ---------- absolute (2 Replies)
Discussion started by: wk9031
2 Replies

10. Shell Programming and Scripting

Bash function to suppress warning message for specific text and display prompt

In the below bash function multiple variants are input and stored in a variable $variant, and each is written to an out file at c:/Users/cmccabe/Desktop/Python27/out.txt stored on a separate line. # enter variant phox2b() { printf "\n\n" printf "What is the id of the patient getting... (0 Replies)
Discussion started by: cmccabe
0 Replies
FGETTY(8)						   System Administrator's Manual						 FGETTY(8)

NAME
fgetty - a small getty for linux SYNOPSIS
fgetty tty [--noclear] [--long-hostname] DESCRIPTION
The command fgetty is normally invoked by init(8), opens a tty port, prompts for a login name and invokes the /bin/login command. OPTIONS
--noclear makes fgetty not clear the screen before displaying the login prompt. --long-hostname makes fgetty display the full hostname in the login prompt. FILES
/etc/issue printed before the login prompt /etc/inittab init(8) configuration file /var/run/utmp the system status file ISSUE ESCAPES
The issue-file (/etc/issue or the file may contain certain escape codes to display the system name, date and time etc. All escape codes consist of a backslash () immediately followed by one of the letters explained below. d the current date. (eg: 2002-01-19) s the system name, the name of the operating system. (eg: Linux) l the name of the current tty line. (eg: tty3) m the architecture identifier of the machine (eg: i586) n the nodename of the machine, also known as the hostname. (eg: sirius) o the domainname of the machine. (eg: (none)) r the release number of the OS. (eg: 2.4.3-i) t the current time. (eg: 14:51:51) u the number of current users logged in. (eg: 4) U the string "1 user" or "<n> users", where <n> is the number of current users logged in. (eg: 4 users) v Insert the version of the OS. (eg: #2 Fre Jan 18 23:05:45 CET 2002) ENVIRONMENT VARIABLES
HOST is set to your hostname TERM is set to linux TTY is set to the current tty line RETURN VALUES
1 could not chown/chmod tty device 3 could not open tty device 4 not a typewriter 5 vhangup failed 6 could not open tty (can't happen) 7 dup failed 8 could not exec login 9 read returned an unexpected error 10 unprintable character in login name 11 login name too long (>40) 13 user name started with a dash 23 received SIGQUIT AUTHOR
Felix von Leitner <felix-fgetty@fefe.de> Homepage: http://www.fefe.de/fgetty/ fgetty 2002-01-19 FGETTY(8)
All times are GMT -4. The time now is 10:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy