~nafallo/+junk/screen_ssh

« back to all changes in this revision

Viewing changes to screen_ssh.sh

  • Committer: Nafallo Bjälevik
  • Date: 2018-05-07 12:33:44 UTC
  • Revision ID: nafallo@ubuntu.com-20180507123344-xwtgkb2omk4he75y
Fix for optional location, per $hostname.$loc

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
  dbg "Using OpenSSH 5.x hostname specification: $HOST"
67
67
fi
68
68
 
69
 
echo $HOST | sed -e 's/\.[^.]*\.[^.]*\(\.uk\)\{0,1\}$//' | awk '{ printf ("\033k%s\033\\", $NF) }'
 
69
echo $HOST | sed -e 's/\(\.[^.]\{0,3\}\)\{0,1\}\.[^.]*\.[^.]*\(\.uk\)\{0,1\}$//' | awk '{ printf ("\033k%s\033\\", $NF) }'
70
70
 
71
71
dbg "Done."