The following script(s) work fine if copy and pasted into the shell. However, when creating a script file and interpreting with BASH- it fails with error: "Syntax error:"(" unexpected. It appears the logical "!" (not) is not being interpreted.
'''
#!/bin/bash
for TARGETFOLDER in !(*Sidereal);
do cd $TARGETFOLDER;
echo "--->---> Processing" $TARGETFOLDER;
for FILTERFOLDER in *;
do cd $FILTERFOLDER;
echo "--->--->---> Processing" $TARGETFOLDER $FILTERFOLDER;
pp_prepare -keep_wcs *r.fits;
pp_photometry -snr 3 -minarea 12 -aprad 6 *r.fits;
pp_calibrate -instrumental *r.fits;
cd ..;
done;
cd ..;
done;
'''
Is there a way to have this interpreted correctly- or maybe rewritten to conform to an interpreter? The original script as given was not formatted nicely... sorry thanks