View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000943 | OpenFOAM | Bug | public | 2013-08-05 14:28 | 2013-08-05 15:18 |
Reporter | Assigned To | henry | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | Fedora | OS Version | 16 |
Summary | 0000943: foamCleanPath script shows error if $PATH contains the character '@' | ||||
Description | e.g.: $ mkdir foo@bar $ OpenFOAM-2.2.1/bin/foamCleanPath foo@bar sed: -e expression #1, char 13: unknown option to `s' foo@bar $ This is because the @ is used as the pattern delimiter in the foamCleanPath, and the @ in the directory name breaks the pattern compilation. | ||||
Additional Information | My version of sed (GNU sed version 4.2.1) allows the use of ":" as the pattern deliminator. As the PATH variable separates its entries with the : character, this is safe to use in the sed as shown in the following patch: diff --git a/bin/foamCleanPath b/bin/foamCleanPath index 0498f0c..cad3f0d 100755 --- a/bin/foamCleanPath +++ b/bin/foamCleanPath @@ -126,7 +126,7 @@ do if [ -e "$dir" ] then #- no duplicate dirs - duplicate=$(echo " $dirList " | sed -ne "s@ $dir @DUP@p") + duplicate=$(echo " $dirList " | sed -ne "s: $dir :DUP:p") if [ ! "$duplicate" ] then $ OpenFOAM-2.2.1/bin/foamCleanPath foo@bar foo@bar $ | ||||
Tags | No tags attached. | ||||