0
Im trying to source a large script with many functions in it that take some time. I would like to present a dialog "sourcing please wait..." in the mean time. once done sourcing i want to use my functions. but using the dialog seems to cancel the souring. the sourcing does processed with the dialog but the function does not run.
file: main.script.sh
#!/bin/bash
long task...
function PrintDate(){
date
}
file: job1.sh
#!/bin/bash
source main.script.sh | dialog --progressbox "sourcing please wait..." 20 80
PrintDate
command prompt:
bash job1.sh
output i get
PrintDate: command not found
ive corrected according to your remarks. its was just a typo from my side and thanks that works for me! – Asaf Magen – 2017-02-27T09:35:38.860