Package: bash
Version: 3.1-2
Followup-For: Bug #343312

The regexp to find hostname for ssh has been corrected. Now, there is
not runtime error, but it still not quite good :
[EMAIL PROTECTED]:~$ sed -ne "s/^[Hh][Oo][Ss][Tt][\"$'\t '\"]*\([^*?]*\)$/\1/p" 
.ssh/config 
bugs
name daffy.XXXXX.XXX
mim
info
name info.XXXXXXX.XX
name atsina.XXXXX.XXX

Lines with 'Host ...' are matched correctly, but not lines with
'Hostname' (the 'name' leading on some lines)

So, I propose to use :
sed -ne 
"s/^[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?[[:space:]]\+\([^*?[:space:]]\+\)[[:space:]]*$/\2/p"

ie line begining with host or hostname followed by spaces followed by
a name without space nor '*' nor '?' followed by optional spaces.

  Best regards


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)

Versions of packages bash depends on:
ii  base-files                    3.1.9      Debian base system miscellaneous f
ii  debianutils                   2.15.2     Miscellaneous utilities specific t
ii  libc6                         2.3.5-11   GNU C Library: Shared libraries an
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

bash recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to