LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 10-29-2008, 07:19 PM   #1
pheardotcom
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
Noobie Command Question help!!


Hello,
here's the question:
"Sort the combined contents of the files file10 and file9. Redirect the output to file3 replacing the current content. Your current working directory is /opt use relative paths only. Use character class to NOT select file8, but select file9 and file10..."

This is what i tried, but failed:
sort -m ./opt/file[:3:][:4:] > ../lab/file3

how can i complete this?
 
Old 10-29-2008, 07:45 PM   #2
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,039
Blog Entries: 52

Rep: Reputation: Disabled
Somebody will be along shortly to reply: sorry, we don't do your homework for you.
 
Old 10-29-2008, 08:26 PM   #3
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,040

Rep: Reputation: 373Reputation: 373Reputation: 373Reputation: 373
Quote:
Originally Posted by pheardotcom View Post
Hello,
here's the question:
"Sort the combined contents of the files file10 and file9. Redirect the output to file3 replacing the current content. Your current working directory is /opt use relative paths only. Use character class to NOT select file8, but select file9 and file10..."

This is what i tried, but failed:
sort -m ./opt/file[:3:][:4:] > ../lab/file3

how can i complete this?
Some pointers:
  • If you are already in /opt, you don't need to specify it. So, if the files are in /opt, and you are in opt, remove the path.
  • Look at the curly brackets { , } expansion.
 
Old 10-29-2008, 09:23 PM   #4
IsharaComix
Member
 
Registered: Sep 2008
Location: Raleigh
Distribution: Ubuntu 8.10
Posts: 88
Blog Entries: 1

Rep: Reputation: 15
Should you be using the -m option? Check the man pages, and you'll see that it doesn't even sort the files.

(kind of a useless option, if you ask me).
 
  


Reply

Tags
command


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Noobie rpm question itz2000 Linux - Newbie 4 08-31-2007 06:37 PM
smart noobie question alaios Suse/Novell 1 10-27-2006 10:03 AM
noobie up2date question zarnold Red Hat 3 09-02-2006 10:10 PM
noobie question about rc.d file bob cashman Ubuntu 3 07-15-2005 10:31 AM
noobie bash command question SamerAdra Linux - Newbie 5 10-26-2004 02:42 AM


All times are GMT -5. The time now is 03:21 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 Google+: linuxquestions
Open Source Consulting | Domain Registration