user input

parent 1de5cdf0
...@@ -2,27 +2,25 @@ ...@@ -2,27 +2,25 @@
#Convert L1C Products to L2A using L2A_Process #Convert L1C Products to L2A using L2A_Process
filename=$1 #L1C Filename /home/geoint/NAS/meridaL1C_2c/S2B_MSIL1C_20181005T163129_N0206_R083_T16QBH_20181005T214055.zip filename=$1 #L1C Filename /home/geoint/NAS/meridaL1C_2c/S2B_MSIL1C_20181005T163129_N0206_R083_T16QBH_20181005T214055.zip
basename=${filename##*/} #S2B_MSIL1C_20181005T163129_N0206_R083_T16QBH_20181005T214055.zip basename=${filename##*/} #S2B_MSIL1C_20181005T163129_N0206_R083_T16QBH_20181005T214055.zip
echo $filename #echo $filename
echo $basename #echo $basename
Z1=$(echo $(echo $basename | cut -d "_" -f1) | cut -d "/" -f3) Z1=$(echo $(echo $basename | cut -d "_" -f1) | cut -d "/" -f3)
Z2=$(echo $basename | cut -d "_" -f3,4,5,6,7 | cut -d "." -f1) Z2=$(echo $basename | cut -d "_" -f3,4,5,6,7 | cut -d "." -f1)
L2A=$Z1"_MSIL2A_"$Z2 L2A=$Z1"_MSIL2A_"$Z2
echo $L2A #echo $L2A
#if [ ! -e $L2A.zip ]; then if [ ! -e $L2A.zip ]; then
# echo "Processing: " $filename " into " $L2A.zip echo "Processing: " $filename " into " $L2A.zip
## unzip -o $filename # unzip -o $filename
## DIRNAME=$(echo $filename | cut -d "/" --complement -f1,2) # DIRNAME=$(echo $filename | cut -d "/" --complement -f1,2)
## DIRNAME=$(echo $DIRNAME | cut -d "." -f1).SAFE # DIRNAME=$(echo $DIRNAME | cut -d "." -f1).SAFE
## L2A_Process $DIRNAME # L2A_Process $DIRNAME
## zip -r $L2A.zip $L2A.SAFE/ # zip -r $L2A.zip $L2A.SAFE/
## rm -r $L2A.SAFE/ # rm -r $L2A.SAFE/
## rm -r $DIRNAME/ # rm -r $DIRNAME/
#else else
# echo "PASSING: " $L2A.zip " found" echo "PASSING: " $L2A.zip " found"
#fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment