test_parse_yaml.sh #1

  • //
  • guest/
  • perforce_software/
  • sdp/
  • dev/
  • Server/
  • Unix/
  • p4/
  • common/
  • test/
  • yaml/
  • test_parse_yaml.sh
  • View
  • Commits
  • Open Download .zip Download (533 B)
#!/bin/sh

source /p4/common/lib/libYAML.sh

# read yaml file
eval $(parse_yaml sample_test_config.yml "config_")

# access yaml content
echo Dev_DB: $config_development_database

echo Prod_Passwd: $config_production_password

echo Prod-Username: $config_production_username

echo Dev_ArrayCheck: 0 - ${config_development_acheck[0]} 1 - ${config_development_acheck[1]} 2 - ${config_development_acheck[2]}

echo Prod_ArrayCheck: 0 - ${config_production_acheck[0]} 1 - ${config_production_acheck[1]} 2 - ${config_production_acheck[2]}
# Change User Description Committed
#2 26679 Robert Cowham Remove Perl libs which aren't used by anything in main section of SDP
Remove test scripts
#1 17251 C. Thomas Tyler Added YAML parsing bash library, complete with a test script and sample data file.