Jun 14, 2005 #1 msen IS-IT--Management Joined Apr 24, 2001 Messages 36 Location US I want the first 5 characters of the hostname. What command should I use and the syntax. Quick help needed. Thanks, Mandira
I want the first 5 characters of the hostname. What command should I use and the syntax. Quick help needed. Thanks, Mandira
Jun 14, 2005 #2 Chacalinc Vendor Joined Sep 2, 2003 Messages 2,043 Location US hostname | cut -b 1-5 Upvote 0 Downvote
Jun 14, 2005 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR In a ksh-like shell: typeset -L5 myHost=$(hostname); echo $myHost Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
In a ksh-like shell: typeset -L5 myHost=$(hostname); echo $myHost Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886