Skip to content
Advertisement

sqlplus query + loop on linux

I have pratically 0 experience on unix and few on mysql and I am finding hard where to start to complete this task, I have to write a .sh file to launch once a day.

I have a table on OracleDb where I have 2 columns I need: path and file_name.

JavaScript

Once I get the results, I should loop through the file system to check if the file in its path exists, if it does not, the script should sleep for few minutes and repeat from the query.

if it does find every file, then it’s completed.

Advertisement

Answer

me!

I solved this with this recursive function

JavaScript

Called in another .sh, where you initialized the variables

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement