Trying to use the following loop (from previous example) in a *.sh script.
for file in 'ls'; do
compress $FILE
done
Question is this, the *.sh file contains a variable exppath that defines the path to the data files. This *.sh is called from the scripts directory.
Do I need to include the path or variable defining the path to the datafiles within the for loop? Where would I include such?
for file in exppath 'ls'; do
compress $FILE
done
or
for file in 'ls' exppath; do
compress $FILE
done
Help is much appreciated.
for file in 'ls'; do
compress $FILE
done
Question is this, the *.sh file contains a variable exppath that defines the path to the data files. This *.sh is called from the scripts directory.
Do I need to include the path or variable defining the path to the datafiles within the for loop? Where would I include such?
for file in exppath 'ls'; do
compress $FILE
done
or
for file in 'ls' exppath; do
compress $FILE
done
Help is much appreciated.