I have this script that just unzips a few files.
I have labeled this directory in the "basename"
name space. Which is great becuase I don't have to
write out the whole thing in the line every time I
reference the path. However the script does not change to the
directory. The "cd to $basename" does not work.
the script does not switch to the basename direcotry after it is done .
Code:
#!/bin/bash
wrapper_date=$(/bin/date +%Y%m%d)
base_path="/sbcimp/dyn/data/EVT_RESEARCH1/engine_logs/qgen/"
file1="/casper-process-1.log"
file3="/casper-process-3.log"
gunzip "$base_path$wrapper_date$file1.gz"
gunzip "$base_path$wrapper_date$file3.gz"
#does this not go to the next command unless the gzip is done.
cd $basepath
pwd