[Novalug] substrings FQDN names in bash scripting

Miguel Gonzalez miguel_3_gonzalez@yahoo.es
Tue Mar 3 14:41:27 EST 2009


Dear all,

 It's driving me nuts...

 I'm trying to short a list of servers which comprises short and FQDN server so all of them are converted to hostnames so if i have:

 server1.domain.com
 server2
 server3.domain.com

 I convert them all into:

 server1
 server2
 server3

 I have a $i variable that iterates the list of servers.

 I was trying something like:

 echo ${"$i":echo `expr match "Si" '.*'`}

 but it doesn't work.

 Any help? I've googled but no luck

 Miguel


 


      



More information about the Novalug mailing list