Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Strip a Carriage-Return from a string/variable
- X-seq: zsh-users 14318
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Strip a Carriage-Return from a string/variable
- Date: Tue, 25 Aug 2009 16:06:39 +0000 (UTC)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- Sender: news <news@xxxxxxxxxxxxx>
Hi
print ${somevar//[^[:alnum:]]/_} # replace all non-alphanumerics with _
But how to delete just a trailing or not carriage return?
--
zzapper
http://www.successtheory.com/tips/cygwintips.php (in progress)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author