well - your prompt could be set to be most anything usually using the PS1 variable - I'm guessing that unix11 is the username you connected as, in which case you could use one of:
id
$USER / $user variable
whoami
etc
to see what your prompt looks like use echo $PS1
(and to answer your question try echo unix11@raghav | sed 's/@.*//' )
echo unix11@raghav | sed 's/@.*//'
or
echo unix11@raghav | cut -d@ -f1
or
echo unix11@raghav | awk -F"@" '{print $1}'
The PS1 environment variable is how the prompt is defined. Try the echo trick on that variable, or use one of the string operations on the variable - the ones in shell.
thats not my id , its my server name .. and if i cannot cut those server name is there a possibility to create in link from the source directory to target .
so that when i run the shell script it calls this executable and performs the functions ..
i have only two servers one is unix11 and unix 12 .. in these i have the executables in bin directory . If i create a link in my local directory will that work ???
also let me know how to create a link for a file so that it would be very helpful !!!
Thankyou!!! both of my executable is located in the same server .. let say i installed the executable in on location , can it be accessed from a different path using links .. i tried the same but it says "file is not found ""
Great Thanks !!!
Is there a way to call a executable by creating a link .. this is the problem which i am right now facing .. if any one help on me on this .. it would great .. because i created a link as well which also didnot work