sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

inte_fish.sh (431B)


      1 #!/usr/bin/env bash
      2 
      3 YELLOW='\033[1;33m'
      4 GREEN='\033[0;32m'
      5 NC='\033[0m'
      6 filename="./build/mapping.txt"
      7 count=0
      8 
      9 name=""
     10 
     11 while read -r line
     12 do
     13     if [ "${line:0:1}" = "#" ]
     14     then
     15 	name_num=(${line//:/ })
     16 	name=${name_num[0]:1}
     17     else
     18 	str=""
     19 	IFS=';' read -ra array_glyph <<< "$line"
     20 	for glyph in "${array_glyph[@]}"; do
     21 	    info=(${glyph//:/ })
     22 	    echo "set -g ${info[0]} \u${info[1]}"
     23 	done
     24     fi
     25 
     26 done < "$filename"