LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 02-05-2012, 05:16 PM   #1
Pl3th0r4x
Member
 
Registered: Dec 2011
Location: Land of Derk
Distribution: Derka
Posts: 71

Rep: Reputation: 0
Teachers 1st Question on HW


OK, I'm confused enough to ask for help now. My teacher wants to know

Quote:
"Use the cat utility with redirection as a simple editor to create a file in your home directory with your full name on the first line, and a blank second line."
He wants to know what the command is we used to create the document.

So far after a few hours of research and reading the best I have come up with is:

Code:
$ cat > Pl3th0r4x
Pl3th0r4x

^D
$
And then when I check to see the file I get:

Code:
$ echo Pl3th0r4x
Pl3th0r4x
$
No space.

Is echo showing me something different? In the gedit document "Pl3th0r4x" is saved with 2 lines, but it isn't reflecting that in the Terminal and thats what I think he is asking.
 
Old 02-05-2012, 07:26 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,442

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
The echo command just echoes back what you give it. You are not reading the file back in when you use echo.

See:
Code:
echo hello world!
Your gedit is right.
 
Old 02-05-2012, 07:32 PM   #3
Pl3th0r4x
Member
 
Registered: Dec 2011
Location: Land of Derk
Distribution: Derka
Posts: 71

Original Poster
Rep: Reputation: 0
Ya I used the command

Code:
$ cat > Pl3th0r4x
Pl3th0r4x

^D
$
And then just typed

cat Pl3r0r4x

And it showed me the correct output.

Now he wants me to take the contents from apropos and calander and put them into a new file. At least thats what i think he wants.

Im pretty sure its

Code:
$ cat newfile
$ touch cal > newfile
But that may or may not be correct.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Teachers' Software? Novatian Linux - Software 9 02-16-2012 08:44 PM
my 1st question. waqar Solaris / OpenSolaris 2 03-04-2006 08:17 PM
My 1st question oo_buck_us General 8 03-04-2006 12:35 PM
very 1st question from a newbie... linuxlinus Linux - Newbie 10 01-21-2004 01:24 PM


All times are GMT -5. The time now is 05:39 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration