Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-07-2004, 09:54 AM
|
#1
|
Member
Registered: Oct 2004
Posts: 52
Rep:
|
output to a file - cat? grep?
I'd like to have the output of one file, just text, add a line to another text file. I know it's fairly simple, but I can't seem to find the info on it.
I run gentoo, and have all of my use flags stored in a text file, use.flags and I would like the lines added to the bottom of make.conf
Thanks~
|
|
|
12-07-2004, 10:05 AM
|
#2
|
Senior Member
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154
Rep:
|
cat use.flags >> make.conf
|
|
|
12-07-2004, 10:08 AM
|
#3
|
Member
Registered: Oct 2004
Posts: 52
Original Poster
Rep:
|
great! thanks~
|
|
|
12-07-2004, 10:09 AM
|
#4
|
Member
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405
Rep:
|
wow, so the double >> makes it append to the end of an already existent file?
If so, that's a handy one to know!!
Thanks!!
|
|
|
12-07-2004, 12:10 PM
|
#5
|
Member
Registered: Oct 2004
Posts: 52
Original Poster
Rep:
|
yep!
handy eh.
here are a couple others:
echo "net-www/mozilla-firefox ~x86" >> /etc/portage/package.keywords
grep -i 'xorg' /etc/portage/* >> ./xorg_results
|
|
|
12-07-2004, 12:36 PM
|
#6
|
Member
Registered: Apr 2004
Distribution: Slackware -current, Gentoo, FC3
Posts: 41
Rep:
|
Quote:
Originally posted by jeffreybluml
wow, so the double >> makes it append to the end of an already existent file?
|
Yup.
|
|
|
12-08-2004, 10:06 AM
|
#7
|
Senior Member
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154
Rep:
|
just be careful...
useing only one >
will OVERWRITE rather than APPEND
|
|
|
All times are GMT -5. The time now is 10:31 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|