Hi all,
I'm using a CTX script from
https://psd-repo.uchicago.edu/kite-l...go_asp_scripts. I was forewarned that they were tested under Linux and may or may not work under OS X, although in this situation I must run OS X. When I run ctxedr2lev1eo.sh with a properl input file, I get
Code:
lynnes-iMac:tc_trunk_theirs0 CSSTinterns$ ctxedr2lev1eo.sh list
/Users/CSSTinterns/isis-workspace/mars-proj/theirs/ctxedr2lev1eo.sh: line 41: [[!: command not found
/Users/CSSTinterns/isis-workspace/mars-proj/theirs/ctxedr2lev1eo.sh: line 41: [[!: command not found
/Users/CSSTinterns/isis-workspace/mars-proj/theirs/ctxedr2lev1eo.sh: line 41: [[!: command not found
/Users/CSSTinterns/isis-workspace/mars-proj/theirs/ctxedr2lev1eo.sh: line 41: [[!: command not found
Start ctxedr2lev1eo.sh Sat Jun 25 17:49:03 EDT 2016
first. However, when I copy and paste all of the code up to and including line 41, then run this smaller script alone in isolation on OS X with the same input file, I do not get this same error. Why could this be?
Here's a the script snipped I'm running in isolation:
Code:
lynnes-iMac:test_compat CSSTinterns$ cat linuxornot0.sh
# Just a simple function to print a usage message
print_usage (){
echo ""
echo "Usage: $0 <productIDs.lis>"
echo " Where <productIDs.lis> is a file containing a list of the IDs of the CTX products to be processed."
echo " Product IDs belonging to a stereopair must be listed sequentially."
echo " The script will search for CTX EDRs in the current directory before processing with ISIS."
}
### Check for sane commandline arguments
if [[ $# != 1 ]] || [[ "$1" = "-"* ]]; then
# print usage message and exit
print_usage
exit 0
else
p=$1
fi
lynnes-iMac:test_compat CSSTinterns$
with "if [[ $# != 1 ]] || [[ "$1" = "-"* ]]; then" being the line that acts up in the larger program.
Spent a while on this, but have more time to figure it out. Any ideas?