|
From: | Eric Blake |
Subject: | Re: conditional aliases are broken |
Date: | Thu, 18 Aug 2011 11:57:46 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.11 |
On 08/18/2011 08:53 AM, Roman Rakus wrote:
On 08/18/2011 04:38 PM, Sam Steingold wrote:how do I write a function that would print the same as $ \ls | catf3(){ printf "%s\n" "$@"; }
"\n" looks funny in shell; even though POSIX requires that "\n" does not treat the \ as an escape but as a literal character, stylistically, I prefer writing "\\n" or '\n' to make it clear that I intended a literal backslash.
-- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |