Browse code

bash_profile (heron) - v1.4 - Adapt screen on node

Fred authored on14/08/2014 11:34:48
Showing1 changed files
... ...
@@ -1,14 +1,15 @@
1 1
 # Title: .bash_profile
2 2
 # Author: Frédéric CHEVALIER <f15.chevalier@gmail.com>
3
-# Version: 1.3
3
+# Version: 1.4
4 4
 # Created in: 2012-05-25
5
-# Modified in: 2014-08-06
5
+# Modified in: 2014-08-14
6 6
 
7 7
 
8 8
 #==========#
9 9
 # Versions #
10 10
 #==========#
11 11
 
12
+# v1.4 - 2014-08-14: adapt behavior of the start screen regarding the screen program
12 13
 # v1.3 - 2014-08-06: part for SSH environment setup moved from .bashrc to avoid setting up SSH environment when connection to a node (qrsh)
13 14
 # v1.2 - 2014-07-09: behaviour modified when login to a node using qrsh (qrsh alias modified / if loop correction for message)
14 15
 # v1.1 - 2014-07-01: specific aliases needed for GridEngine added
... ...
@@ -115,7 +116,7 @@ fi
115 116
 name=${HOSTNAME%%.*}
116 117
 nb=$(printf "%${#name}s\n" "" | sed "s/ /=/g")
117 118
 
118
-if [[ ! $HOSTNAME =~ compute.* ]]
119
+if [[ ! $HOSTNAME =~ compute.* && ! $(ps ux | grep screen | grep -v grep) ]]
119 120
 then
120 121
     nb=$nb=======
121 122
     echo -e "\n\n"