LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 06-26-2010, 04:37 PM   #1
Dru-Jitsu
Member
 
Registered: Jun 2010
Posts: 38

Rep: Reputation: 15
Ideas???


Onto the next one... I am not sure what my teacher is exactly asking here....

Create a copy of the file above and call it commands.sorted. Use the vi command to manually sort this file. I.e. use yy to copy a line, P or p to paste a line, and dd delete a line. Order the commands with the two lines starting with double quotes first. Then list the rest of the command in alphabetical order.

Anyone have any ideas what he's talking about? Can I copy a file and rename it at the same time while copying it to the same exact directory again? Now sure what the two lines things means either. I have an email out to him but it usually takes a long time for him to answer me. I got alot of work to do so everytime I get hung up it kills me.

Help is much appreciated as always.
 
Old 06-26-2010, 04:52 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by Dru-Jitsu View Post
Can I copy a file and rename it at the same time while copying it to the same exact directory again?
Of course. The cp command can do that: if the destination is a non-existent file name (not a directory name), the original file (source) will be copied and renamed at the same time. You can easily try it out.
Quote:
Originally Posted by Dru-Jitsu View Post
Now sure what the two lines things means either
You have to look at the content of the file carefully and look for two lines starting with double quotes. Then sort all the lines following the suggested rule.
 
Old 06-26-2010, 07:27 PM   #3
sneakyimp
Senior Member
 
Registered: Dec 2004
Posts: 1,056

Rep: Reputation: 78
Yes suppose a file in the current working directory is called 'foo.txt'

You can copy it thusly:
Code:
cp foo.txt commands.sorted
I'm not very familiar with vi so can't help you there.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ideas Please. Hern_28 Linux - General 5 12-02-2008 09:49 PM
LXer: Ten ideas about Ideas LXer Syndicated Linux News 0 11-05-2006 08:21 AM
Need some ideas redfedora88 Linux - General 4 09-05-2005 11:31 PM
any ideas? hydraspective Linux - Hardware 2 12-15-2004 12:36 AM
Ideas. jdii1215 LQ Suggestions & Feedback 4 06-01-2003 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration