LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-17-2017, 09:33 AM   #16
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 8,444
Blog Entries: 13

Rep: Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762Reputation: 3762

Quote:
Originally Posted by techchamp View Post
[-- advertising link removed by moderator -- ]
Quote:
Originally Posted by TB0ne View Post
Congratulations; you've done someones homework for them, and they have learned absolutely nothing from the exercise. Read the LQ Rules about homework questions, and if you're going to post something like this, don't then follow it up to advertise your 'linux learning' blog, which is also against the LQ Rules about advertising.
Quite correct and thank you TB0ne, as well as sundialsvcs for noting this, as well as noting that techchamp had advertised in one of their posts.

techchamp has been contacted about this infraction of LQ rules.

Also to note is that the OP may not understand the solution, or may find that the solution is not correct or ideal for what they want or need and then have follow-up questions. Per TB0ne's and sundialsvcs' points, the OP hasn't learned, while it may or may not help them to pass one technical question, they may not understand the answer at all. Therefore techchamp, your actions are nearly pointless.
 
1 members found this post helpful.
Old 02-17-2017, 09:59 AM   #17
Turbocapitalist
Senior Member
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 4,470
Blog Entries: 3

Rep: Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232Reputation: 2232
Quote:
Originally Posted by techchamp View Post
I am posting the direct answer as this is for an assignment and not an enterprise activity.
That "answer" is also pretty poorly done. There are a lot of mistakes and faux pas in it, despite being all on one line. If it produces the correct output, it might get minimal points, but only based on the output not how the output was generated.

Last edited by Turbocapitalist; 02-17-2017 at 10:00 AM.
 
1 members found this post helpful.
Old 02-17-2017, 10:38 AM   #18
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,653

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Although you have a one-line answer, is it the best answer?
Its got no documentation and its quite likely going to be hard hard to amend it for a similar problem...

Anyway the OP was supposed to be using 'cut' so I think he will get no marks for using 'awk' etc.
 
1 members found this post helpful.
Old 02-17-2017, 10:49 AM   #19
GazL
LQ Guru
 
Registered: May 2008
Posts: 5,394
Blog Entries: 14

Rep: Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202Reputation: 3202
Quote:
Originally Posted by JeremyBoden View Post
Although you have a one-line answer, is it the best answer?
It's not even a good answer let alone the best.
I don't want to break any rules, so I'll simply hint that you can do it all with a single 'join' command(*) and suggest you go read the manpage. Pay particular attention to the -t and -o options.


(*) Well, ok, if the input is not pre-sorted you'll probably also want 'sort'.
 
1 members found this post helpful.
  


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



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

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