[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [50 character or so descriptive subject here (for reference)]
From: |
Chet Ramey |
Subject: |
Re: [50 character or so descriptive subject here (for reference)] |
Date: |
Wed, 20 Mar 2002 08:24:23 -0500 |
> Machine Type: i386-redhat-linux-gnu
>
> Bash Version: 2.05
> Patch Level: 8
> Release Status: release
>
> Description:
> the shell builtin 'alias' removes \ and ' characters when displaying
> a list of currently defined aliases.
>
> Repeat-By:
> [w2:pgl]:~ $ grep dos2u .bash_profile
> alias dos2u='perl -pi -e 's/\cM//' *.{html,php3,php,php4,htm,inc,txt}'
This doesn't do what you think it does. You may not have a single
quote inside single quotes, so your alias definition consists of two
single-quoted strings separated by your sed pattern. Since the sed
pattern is unquoted, the backslash is removed before the alias is
assigned.
You probably want something like
alias dos2u="perl -pi -e 's/\cM//' *.{html,php3,php,php4,htm,inc,txt}"
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)
Chet Ramey, CWRU chet@po.CWRU.Edu http://cnswww.cns.cwru.edu/~chet/
[50 character or so descriptive subject here (for reference)], Caldera OpenLinux User, 2002/03/26