From owner-freebsd-questions@FreeBSD.ORG Sat Mar 8 13:57:29 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B548A106566C for ; Sat, 8 Mar 2008 13:57:29 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 363068FC14 for ; Sat, 8 Mar 2008 13:57:29 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:60772 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1JXzYG-0000hT-6p for freebsd-questions@freebsd.org; Sat, 08 Mar 2008 14:57:28 +0100 Received: (qmail 85206 invoked from network); 8 Mar 2008 14:57:25 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 8 Mar 2008 14:57:25 +0100 Received: (qmail 7499 invoked by uid 1001); 8 Mar 2008 14:57:25 +0100 Date: Sat, 8 Mar 2008 14:57:25 +0100 From: Erik Trulsson To: Victor Subervi Message-ID: <20080308135725.GA7438@owl.midgard.homeip.net> Mail-Followup-To: Victor Subervi , Mel , freebsd-questions@freebsd.org References: <4dc0cfea0803030652n2f048784qcfc46ad561d9fbf9@mail.gmail.com> <200803040022.34594.fbsd.questions@rachie.is-a-geek.net> <4dc0cfea0803080548q6f5bb4e0rd229f4fb0f29149b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <4dc0cfea0803080548q6f5bb4e0rd229f4fb0f29149b@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1JXzYG-0000hT-6p. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1JXzYG-0000hT-6p 83274138c40c3a6ab4464bf310bf382b Cc: Mel , freebsd-questions@freebsd.org Subject: Re: Variable Substitution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 13:57:29 -0000 On Sat, Mar 08, 2008 at 02:48:52PM +0100, Victor Subervi wrote: > No, no, I have made myself misunderstood. I am looking for a %x where x is > some letter that will enable me to substitute a file. What do you mean by "substitute a file". Do you mean the name of a file? Or the contents of a file? Or a file handle? Or something else? Also: what language/tool are you using? '%x' (for various values of x) is primarily used by printf() and scanf(). They do not have any special forma= ts for files of any kind. You will have to explain in more detail what it is you are actually trying to do, because that is not clear at all. > Also, I am looking for > a howto to brush up on that. What is this called if not variable > substitution, which is not google-friendly? > TIA, > Victor >=20 >=20 > On 3/4/08, Mel wrote: > > > > On Monday 03 March 2008 15:52:51 Victor Subervi wrote: > > > > > Forgive this basic question, but can=B4t figure out how to google it.= If I > > > want to substitute strings in an expression, I can use %s for string,= or > > %d > > > for digit. What about file? What is this process called, so I can fin= d a > > > howto? > > > > printf(1) or printf(3), pending what language you want. > > -- > > Mel > > --=20 Erik Trulsson ertr1013@student.uu.se