I have almost thousand of files with .dat extension And I am using a tool built in go to upload it, But There is an issue as my each file is 31 GB and there a lot, So I want to make a bash script for doing this, which may work like root@Ubuntu-1404-trusty-64-minimal /storage # gdrive --config config.json upload 7.datUploading 7.datUploaded 0B8RgYtlwEE1sSzJxeEhKd19PWnM at 17.7 MB/s, total 31.5 GBBut It need monitoring after each upload, I need to set next upload. Is there possible in any bash linux script, Which may wait for the process to be complete? and the automatically start for the next .dat file? Sorry for poor description. and Thanks for the help in advance. 
upload files to gdrive using a tool but in a script
shell script
#!/bin/bashfor f in *.datdo    gdrive --config config.json upload $fdoneOr a bash one-liner:[mehlsec@localhost ~]$ for f in *.dat; do gdrive --config config.json upload $f; doneThese will upload all .dat files in your current directory one after the other.