balford
07-11-2002, 09:39 AM
hey all,
I'm a newbie... and taking my first attempts at bash scripting. I was reading the NHF on bash scripting... I got a feel for some of the commands. I can copy/move/create/delete directories and do the ls commands and all that stuff we know and love, but i think i wanna move on.
I checked out my ~/.bash_profile so I could edit the PS1 variable.
To my understanding, the PS1 (Variable?) is what controls what the command line in a terminal looks like.
My first problem is that no where in the ~/.bash_profile can i find "PS1". So I tried adding the following in hopes to add the current time to my command line...:
PS1="[t u@\h \w]\$"
...but nothing happened. I reset my terminal after saving the file and still, nothin' happened.
Do I need to reset my comp or simply log off and log back in again?
I was also wondering... if 'PS1' is a "variable"?
If this is the case... do i need to add the line...:
export PS1
...after my previous line of code?
Thanks for the help!:D
-------------------------------------------
also... i'm not a huge programmer or anything... i mostly use my computer for music and video games. Are there any other neat little things and tricks I can do in a terminal that will be useful for me?? I'd love to learn... I really hate the idea of going back to windows, but when i turn on linux, I feel like i sit there and just listen to music. :( What can i do in it?
I'm a newbie... and taking my first attempts at bash scripting. I was reading the NHF on bash scripting... I got a feel for some of the commands. I can copy/move/create/delete directories and do the ls commands and all that stuff we know and love, but i think i wanna move on.
I checked out my ~/.bash_profile so I could edit the PS1 variable.
To my understanding, the PS1 (Variable?) is what controls what the command line in a terminal looks like.
My first problem is that no where in the ~/.bash_profile can i find "PS1". So I tried adding the following in hopes to add the current time to my command line...:
PS1="[t u@\h \w]\$"
...but nothing happened. I reset my terminal after saving the file and still, nothin' happened.
Do I need to reset my comp or simply log off and log back in again?
I was also wondering... if 'PS1' is a "variable"?
If this is the case... do i need to add the line...:
export PS1
...after my previous line of code?
Thanks for the help!:D
-------------------------------------------
also... i'm not a huge programmer or anything... i mostly use my computer for music and video games. Are there any other neat little things and tricks I can do in a terminal that will be useful for me?? I'd love to learn... I really hate the idea of going back to windows, but when i turn on linux, I feel like i sit there and just listen to music. :( What can i do in it?