I use the following command to print the current directory above the command prompt
The output is something like this
But when I try to CD to any other directory and press the return key, the displayed PWD is never changed.
Hello aelhosiny,
Not sure completely about your requirement, but if you want to change prompt string then you can use PS1 command as follows.
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
Last edited by rbatte1; 10-20-2014 at 09:53 AM..
Reason: Changed ICODE tags to just CODE tags because I did so in above quoted post
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
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.
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:
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
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)
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)
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)
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)
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)
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)
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)
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)