请我需要帮助!
这是我的第一个 bash 脚本,它在某些时候调用 python 脚本。但我总是在第 28 行和第 40 行得到这个输出:
./startTests.sh: line 28: 'logs/tp1/load-test1-workloada.txt': No such file or directory
目录logs/tp1确实存在!我认为这是我必须在那里使用的 char '>' 的东西,但我不知道如何修复它。
这是我的脚本:
#! /bin/bash
echo -e "\033[01;34m------------------------------"
echo -e "| Testes YCSB 0.17 |"
echo -e "------------------------------\033[01;37m"
echo -e 'Está rodando o script da raiz do YCSB? (y/n)'
read yesno
if [ $yesno = 'y' ]; then
echo -e 'Número de throughputs:'
read numOfThroughputs
echo -e 'Número de testes:'
read numOfTests
echo -e 'Iniciando...'
for ((throughput = 1; throughput <= $numOfThroughputs; throughput++)); do
echo -e '\033[01;32m------------------------------'
echo -e "Throughput $throughput "
echo -e '------------------------------\033[01;37m'
for ((test = 1; test <= $numOfTests; test++)); do
echo -e '\033[01;32m------------------------------'
echo -e "Iciando teste $test"
echo -e '------------------------------\033[01;37m'
echo -e 'Loading Workload A'
python ./bin/ycsb load mongodb-async -P workloads/workloada -p mongodb.url=mongodb://172.18.0.3:27017/ycsb?w=1 -P config/load.dat -s > "'logs/tp${throughput}/load-test${test}-workloada.txt'"
for workload in {a,b,c,,f,d,e}; do
if [ $workload = 'e' ]; then
echo -e "\033[01;33mPreparação para workload $workload"
echo -e "Apague o banco e precione QUALQUER TECLA 2X"
read enter
echo -e "Precione QUALQUER TECLA\033[01;37m"
read enter2
python ./bin/ycsb load mongodb-async -P workloads/workloade -p mongodb.url=mongodb://172.18.0.3:27017/ycsb?w=1 -P config/load.dat -s > "'logs/tp${throughput}/load-test${test}-workloade.txt'"
狐的传说
临摹微笑
相关分类