Solved Explanin about special chars '' in the script.

November 9, 2014 at 19:50:12
Specs: Windows 7
Hi All,

Please help to explain me what is happening with the code " IFS=- read -a H <<< "$host" " in below script. I do not understand the special charcters <<< in this code. what is functionality of <<< chars here.

#!/bin/bash
nodecount=10
host=na7-db1-1-chi
IFS=- read -a H <<< "$host"
C=({A..Z})
for ((i=1; i<=nodecount; i++))
do
printf "%s " "${H[0]}-${H[1]}-${i}-${H[3]}:${C[i-1]}"
done
echo


See More: Explanin about special chars in the script.

Report •

#1
November 9, 2014 at 23:45:25
✔ Best Answer
<<< redirects the line of text following it to stdin.

Report •
Related Solutions


Ask Question