Skip to content

Commit

Permalink
Bug fix: Use [ \t]* in regexp in singleCarbonSpecies.sh
Browse files Browse the repository at this point in the history
run/shared/singleCarbonSpecies.sh
- Now use the regexp "[ \t]*" to remove an arbitrary number of
  tabs and spaces when removing lines from the HISTORY.rc file.

Signed-off-by: Bob Yantosca <[email protected]>
  • Loading branch information
yantosca committed Apr 5, 2024
1 parent 77b89f5 commit a2db197
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions run/shared/singleCarbonSpecies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@ function updateHistory() {

# For GCHP: remove entries for species to be excluded
for spc in ${1}; do
sed -i "/\_${spc}'/d" "${file}"
sed -i "/\_${spc} '/d" "${file}"
sed -i "/Emis${spc}_/d" "${file}"
sed -i "/\_${spc}[ \t]*'/d" "${file}"
sed -i "/Emis${spc}_/d" "${file}"
done

# Also disable emissions for OCS-only simulations
Expand Down

0 comments on commit a2db197

Please sign in to comment.