Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ General Discussion _ Easy for you but not for me!

Posted by: cwilso99 Mar 7 2015, 10:00 AM

I am doing an assignment and I need help, I have tried a bunch of different things. Here is the question:
Combine the two files together in alphabetical order (use the sort command), with the results displayed on the screen. Each occurrence of the word Windows should be replaced with the phrase unstable OS. Show the command you used.
File 1
Windows NT
Solaris
Open BSD

File 2
Linux
NetWare
Windows 2000
AIX

I keep coming back to these commands but I can't seem to get it right, I am trying to pipe them together

sort -d file1 file2 > file3 | sed s/Windows/unstable OS/ file3

Any suggestions? This just makes a file3 in alphabetic order and doesn't change any words or display anything on the screen. Thanks for any help.

Posted by: michaelk Mar 8 2015, 10:18 AM

The first error is writing to the file before piping it to sed. The result is that sed has nothing to do.

sort -d file1 file2 | sed 's/Windows/unstable OS/'

There are probably several methods to display the results and write to the file. I do not know what commands you have already learned and forums are not for blindly doing homework for others so will leave the rest to you.


Posted by: addseo1115 May 1 2015, 01:42 AM

haha topic name is funny

Posted by: NickittenPierre Apr 28 2017, 01:18 PM

Your assignment is much difficult and i have tried to solved but failed now i will searched and looking some good solution for this problem.







--------------------------------------------------------------------------
https://www.theacademicpapers.co.uk/buy-dissertation-online.php

Posted by: aida Jun 1 2017, 12:07 AM

thanks for..................................











________________________________________________________________________________
_______________________________________________________________________
https://www.t3me.com/en/

Posted by: ronaldlee Jul 22 2017, 02:28 AM

Thanks for the post

Posted by: wordsdoctorate Sep 7 2017, 03:50 AM

Hi Friends,
I am new to this forum, happy to join here.
Thanks for your information. smile.gif



Posted by: janifarlee Sep 8 2017, 02:12 AM

Hello, i am new user what you shared ??














_________________________

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)