I created this sh script and want to measure time spent on the program:
#!/bin/bash
start=`date +%s`
cd nlu/creator
python3 move_file.py ../../../../../base_data/ ../../resources/kb/
python3 converter.py
python3 transformer.py
cd ../../resources/kb/
find . -name '*.xml' | xargs -I{} rm -rf {}
find . -name '*Object.txt' | xargs -I{} rm -rf {}
end =`date +%s`
runtime=$((end-start))
echo "Building time: ${runtime}"
I execute:
nlu/creator/builder.sh
The error message is:
nlu/creator/builder.sh: line 15: end: command not found
Building time: -1651032434
why does it complain about 'end:command not found'?
Also, why is the time a negative number? I am on a Mac.
end =, ie make itend=.