[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A good yum.conf file...



On Sun, Jul 10, 2005 at 05:01:52PM -0500, Kyle Pointer wrote:
> When he typed cat > /etc/yum.repos.d/<reponame> that was just the
> command he used to print his /etc/yum.repos.d/<reponame> file to the
> screen. Either he figured that you knew that, or he made a typo. :-) 

Actually, that's not the case here.  There's a redirector in that line,
and you're missing the whole point of it. :)

    cat > /etc/yum.repos.d/livna.repo <<END
    [livna]
    name=Livna.org packages for Fedora Core \$releasever - \$basearch
    baseurl=http://rpm.livna.org/fedora/\$releasever/\$basearch/RPMS.lvn/
    enabled=0
    gpgcheck=1
    gpgkey=http://rpm.livna.org/RPM-LIVNA-GPG-KEY-i386
    END

    cat > /etc/yum.repos.d/macromedia.repo <<END
    [macromedia]
    name=Macromedia packages for Fedora Core \$releasever
    baseurl=http://sluglug.ucsc.edu/macromedia/rpm/
    enabled=1
    gpgcheck=1
    gpgkey=http://sluglug.ucsc.edu/macromedia/FEDORA-GPG-KEY
    END

What he's doing is actually using cat for the purpose from whence it got
its name: concatenating streams.  If you'll look closely at the lines,
you'll notice redirectors and notation (someone here must recall the
name of it... I'll be damned if I can) to allow a string to span several
lines.

Google around for answers.  "unix shell redirectors tricks" might bring
up something interesting to read.

-- 
Nathaniel Reindl, freelance tech support monkey and college student
Fedora Core 4 kernel 2.6.12-1.1387_FC4 on an AMD Opteron 240

"Unlike the majority of the Unix peanut gallery, I consider a
case-insensitive, case-preserving file system a screaming /feature/, not
a bug. If you have two distinct files which differ only in case, you're
a pinhead and deserve to lose."
-- Jamie Zawinski, in a comment somewhere about HFS+ in OS X

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.