Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Mar 2008 14:57:25 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Victor Subervi <victorsubervi@gmail.com>
Cc:        Mel <fbsd.questions@rachie.is-a-geek.net>, freebsd-questions@freebsd.org
Subject:   Re: Variable Substitution
Message-ID:  <20080308135725.GA7438@owl.midgard.homeip.net>
In-Reply-To: <4dc0cfea0803080548q6f5bb4e0rd229f4fb0f29149b@mail.gmail.com>
References:  <4dc0cfea0803030652n2f048784qcfc46ad561d9fbf9@mail.gmail.com> <200803040022.34594.fbsd.questions@rachie.is-a-geek.net> <4dc0cfea0803080548q6f5bb4e0rd229f4fb0f29149b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <fbsd.questions@rachie.is-a-geek.net> 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
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080308135725.GA7438>