From owner-freebsd-stable@FreeBSD.ORG Fri Jun 15 18:32:57 2012 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66E971065673 for ; Fri, 15 Jun 2012 18:32:57 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from nk11p00mm-asmtp007.mac.com (nk11p00mm-asmtp007.mac.com [17.158.161.6]) by mx1.freebsd.org (Postfix) with ESMTP id 48D228FC0C for ; Fri, 15 Jun 2012 18:32:57 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from cswiger1.apple.com (unknown [17.209.4.71]) by nk11p00mm-asmtp007.mac.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPSA id <0M5O008XK8UM3910@nk11p00mm-asmtp007.mac.com> for freebsd-stable@FreeBSD.ORG; Fri, 15 Jun 2012 18:32:47 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.260,0.0.0000 definitions=2012-06-15_04:2012-06-15, 2012-06-15, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1012030000 definitions=main-1206150194 From: Chuck Swiger In-reply-to: <201206151823.q5FINRFT084093@lurza.secnetix.de> Date: Fri, 15 Jun 2012 11:32:46 -0700 Message-id: <8F30E6C0-0FDB-46D2-9E2F-3A909B8B6182@mac.com> References: <201206151823.q5FINRFT084093@lurza.secnetix.de> To: Oliver Fromme X-Mailer: Apple Mail (2.1084) Cc: freebsd-stable List Subject: Re: devd problem with 9-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 18:32:57 -0000 On Jun 15, 2012, at 11:23 AM, Oliver Fromme wrote: > You can try to prepend a backslash, i.e. echo \$devnum. This > isn't documented, but then again, using backslashes to continue > strings that span multiple lines isn't documented either. Line continuations and escaping special chars like $ are in "man sh": "Backslash A backslash preserves the literal meaning of the following char- acter, with the exception of the newline character (`\n'). A backslash preceding a newline is treated as a line continuation." The Bash manpage is perhaps more clear about this: There are three quoting mechanisms: the escape character, single quotes, and double quotes. A non-quoted backslash (\) is the escape character. It preserves the literal value of the next character that follows, with the exception of . If a \ pair appears, and the backslash is not itself quoted, the \ is treated as a line continuation (that is, it is removed from the input stream and effectively ignored). Enclosing characters in single quotes preserves the literal value of each character within the quotes. A single quote may not occur between single quotes, even when preceded by a backslash. Enclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of $, `, \, and, when history expansion is enabled, !. The characters $ and ` retain their special meaning within double quotes. The backslash retains its special meaning only when followed by one of the following characters: $, `, ", \, or . A double quote may be quoted within double quotes by preceding it with a backslash. If enabled, history expansion will be performed unless an ! appearing in double quotes is escaped using a backslash. The backslash preceding the ! is not removed. Regards, -- -Chuck