root@server [~]#grep -o '/home/[Aa-Zz]*' /etc/passwd/home/deerlet
The blue pertains to the shell
The purple pertains to the command issued, in this case grep
root@server [~]# This part is the prompt message (visual clue). This part is setup by the shell you are using at the time of login. In the bash shell (for example) it is recorded in the environment variable $PS1. However, it can be influenced or modified by the variable $PROMPT_COMMAND. It can have literally any message.
You can see the values of these variable by issuing the commands:
In this case, by convention the interpretation means: root : the name of the user currently using the shell, it can be set in PS1 with the alias short-hand \u, in bash @ : at server: host name logged in; it can be set in PS1 with the shot-hand alias \h in bash space [~]: cosmetic look; the ~ represents the home path of the currently logged user; it dynamically changes if set in PS1 with a \w or \W # : A symbol to represent the superuser at the helm. It is convention. A regular user might have the symbol % or $. But there's nothing that said that it has to be anything.
The grep command: -o : a flag to make grep just output the matched pattern, instead of the line where found.
'/home/[Aa-Zz]*' : BRE (Basic Regular Expression) pattern, it is surrounded by single quotes to tell the shell not to try to interpreted the content and passed to grep as it. [Aa-Zz] : Character class; The A and lower z are redundant since the range a-Z converts them. [a-Z] does the same. * : Meta character; it means match zero or more of the previous character. Do not confuse with the shell glob (*) character that exist in the shell.
/etc/passwd/home/deerlet : path of the file that grep will read, in order to try to find lines that match the pattern previously mentioned.
Last edited by Aia; 09-27-2015 at 10:35 PM..
Reason: corrects misword.
Hi,
I am trying talk but it isn't working.
I tried
talk ip terminal
talk ip:terminal
First it says:
Then after 2 seconds
I have checked the mesg status: Its y
I am not getting any invitation on the other machine.
Thanks in Advance (1 Reply)
I have the manpage for this utility on my system, but the utility itself is not there.
My friend has the utility, but it does not work, not even on the same machine.
Does anyone remember it? What software package is it related to? Where is it configured? (1 Reply)
Hi,
Could you please advice on the following query:
There are 2 users on a unix box:
1. aaaa
2. bbbb
I open 2 putty sessions and login with the above 2 users.
Then I type the following using the aaaa user to chat with bbbb.
talk bbbb
or
talk bbbb@hostname
Result: the screen goes... (1 Reply)
using talk option i tried to send message to my team mate.
for connecting to one unix box, we are having a common userid and password
except that, the ip addresses will change
for me it is x.x.x.4, for my colleague it is x.x.x.3
These are the steps i did
> who
<userid> pts/2 ... (1 Reply)
Hi! I would like to start creating a bridge for good old Unix talk program. This bridge would allow you to joinIRC-channel by using talk just for example. I have a couple of questions:
1. Are there any previous attempts or implementations creating Talk bridge?
2. Which version of the talk... (9 Replies)