LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   output to a file - cat? grep? (https://www.linuxquestions.org/questions/linux-newbie-8/output-to-a-file-cat-grep-263641/)

Godsmacker777 12-07-2004 09:54 AM

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~

secesh 12-07-2004 10:05 AM

cat use.flags >> make.conf

Godsmacker777 12-07-2004 10:08 AM

great! thanks~

jeffreybluml 12-07-2004 10:09 AM

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!!

Godsmacker777 12-07-2004 12:10 PM

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

kpex 12-07-2004 12:36 PM

Quote:

Originally posted by jeffreybluml
wow, so the double >> makes it append to the end of an already existent file?
Yup.

secesh 12-08-2004 10:06 AM

just be careful...

useing only one >
will OVERWRITE rather than APPEND


All times are GMT -5. The time now is 05:38 PM.