Skip to main content
added 61 characters in body
Source Link
Gilles 'SO- stop being evil'
  • 866.1k
  • 205
  • 1.8k
  • 2.3k

An array could make the string parsing without the need for a temporal file,. Don't forget to turn off globbing.

set -f
IFS=: Hosts=($HostFull)
HostMain=${Hosts[0]}
HostMid=${Hosts[1]}
HostSub=${Hosts[2]}
set +f

An array could make the string parsing without the need for a temporal file,

IFS=: Hosts=($HostFull)
HostMain=${Hosts[0]}
HostMid=${Hosts[1]}
HostSub=${Hosts[2]}

An array could make the string parsing without the need for a temporal file. Don't forget to turn off globbing.

set -f
IFS=: Hosts=($HostFull)
HostMain=${Hosts[0]}
HostMid=${Hosts[1]}
HostSub=${Hosts[2]}
set +f
Source Link
xae
  • 2.1k
  • 17
  • 10

An array could make the string parsing without the need for a temporal file,

IFS=: Hosts=($HostFull)
HostMain=${Hosts[0]}
HostMid=${Hosts[1]}
HostSub=${Hosts[2]}