Computer Hope

Software => BSD, Linux, and Unix => Topic started by: fm_hyudin on June 16, 2008, 01:16:52 AM

Title: need help with linux command
Post by: fm_hyudin on June 16, 2008, 01:16:52 AM
Hi..

thanks alot for reading my question firstly.

i need to do a demonstration on the following question and i really don't know what command to use for these.i need to do this demo using linux terminal.plz help me and thanks in advance.

Append a statement, namely “test” to the file named “linux”.


I tried to google looking what is the meaning for append and it says ;

To place after, or at the end of, a character, a line, or a file. In the vi editor, certain commands let you append text in a document. In the Bourne and C shells, the symbol )) allows you to append output to an existing file (or create a new file if the file does not yet exist).

plz explain and help me.thanks alot for all your help.
Title: Re: need help with linux command
Post by: fm_hyudin on June 16, 2008, 06:20:45 AM
plz help ???
Title: Re: need help with linux command
Post by: TheEmperor on June 16, 2008, 08:14:11 AM
echo test >> linux

That will append the word test to the end of a file named linux.
Title: Re: need help with linux command
Post by: fm_hyudin on June 16, 2008, 06:25:35 PM
thanks alot mate... ;D :D

just another doubt:

how to check whether the name test already added?

is there any other command to check this.
Title: Re: need help with linux command
Post by: fm_hyudin on June 17, 2008, 12:28:01 AM
plz help.....
Title: Re: need help with linux command
Post by: TheEmperor on June 17, 2008, 07:08:01 AM
Checking to see if a file exists is slightly more complicated, and since this sounds like a homework assignment you're going to have to learn to use google on your own.