The below script file will help you to get a bandstructure (in png format). The script assumes you have the outputs relax.out, plotbands.out, Bands.dat.gnu files in the folder where you run this script. Also, you have to give the K-point names like Gamma, X, M etc. in the script.
Example Image obtained from the above script for x3-Borophene.