From 757cc7a15df59cc3bc29ddefa7545e8ccbe306c1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 25 May 2017 10:43:57 +0100 Subject: [PATCH] BUG: cshrc: account for lsof printing mount point after files Some versions of lsof print the mount point (if remote) after the script path: /hosts/mymachine/OpenFOAM/OpenFOAM-plus.develop/etc/cshrc (mymachine:/home) This now gets filtered out. --- etc/cshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/cshrc b/etc/cshrc index 4fb51cad68..688905c2cf 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -43,7 +43,7 @@ setenv WM_PROJECT_VERSION plus # values to an appropriate path. # setenv FOAM_INST_DIR `lsof +p $$ |& \ - sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc@@p'` + sed -n -e 's@[^/]*@@' -e 's@/'$WM_PROJECT'[^/]*/etc/cshrc.*@@p'` # setenv FOAM_INST_DIR $HOME/$WM_PROJECT # setenv FOAM_INST_DIR /opt/$WM_PROJECT # setenv FOAM_INST_DIR /usr/local/$WM_PROJECT