Help - Search - Members - Calendar
Full Version: Easy for you but not for me!
Linuxhelp > In The Community > General Discussion
cwilso99
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.
michaelk
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.

addseo1115
haha topic name is funny
NickittenPierre
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.







--------------------------------------------------------------------------
Buy Dissertation Online
aida
thanks for..................................











________________________________________________________________________________
_______________________________________________________________________
Middle East News
ronaldlee
Thanks for the post
wordsdoctorate
Hi Friends,
I am new to this forum, happy to join here.
Thanks for your information. smile.gif


janifarlee
Hello, i am new user what you shared ??














_________________________
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.